From 52ef5d311c1e47a215bfe7e9ea855a9789f72aac Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 21 Jul 2023 21:48:52 +0200 Subject: [PATCH 1/3] fix toc indentation problem --- core/wiki/macros/toc.tid | 4 ++-- .../TableOfContents/SecondThreeThree.tid | 14 ++++++++++++-- themes/tiddlywiki/vanilla/base.tid | 10 +++------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 528c0e63cc1..a925e7ee532 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -7,7 +7,7 @@ tags: $:/tags/Macro \define toc-caption() \whitespace trim - + <$set name="tv-wikilinks" value="no"> <$transclude field="caption"> <$view field="title"/> @@ -145,7 +145,7 @@ tags: $:/tags/Macro <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
  • >> - <$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <$view field='caption'><$view field='title'/>"> + <$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="""<$button class="tc-btn-invisible">{{$:/core/images/blank}}<>"""> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> <$transclude tiddler=<> /> diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid index be826c19b1f..db2961994dd 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid @@ -1,6 +1,16 @@ created: 20150221194423000 -modified: 20211114013601189 +modified: 20230721191043033 tags: SecondThree [[Table-of-Contents Demonstrations]] title: SecondThreeThree +toc-link: no +type: text/vnd.tiddlywiki + +''Important'' + +It's important that this tiddler has no "child" to be able to visually test every possible toc code-path. + +* This tiddler has a field ''toc-link: no'' +* Do not tag any other tiddler with the title of this one + + -<<.toc-lorem>> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 0feb2582e7b..4603589ae09 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -580,7 +580,7 @@ button svg, button img, label svg, label img { } button:disabled.tc-btn-invisible { - cursor: default; + cursor: default; color: <>; } @@ -2779,15 +2779,11 @@ input.tc-palette-manager-colour-input { white-space: nowrap; } -.tc-table-of-contents button { +.tc-table-of-contents button, +.tc-table-of-contents .toc-item-muted { color: <>; } -button + .tc-toc-caption, -button > .tc-toc-caption{ - margin-left: .25em; -} - .tc-table-of-contents svg { width: 0.7em; height: 0.7em; From d0abd8a2774f0e78790503d99b579ee3330dab30 Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 21 Jul 2023 22:22:34 +0200 Subject: [PATCH 2/3] add caption to Third & Fourth toc tiddlers to see caption-handling --- .../tiddlers/demonstrations/TableOfContents/Fourth.tid | 4 +++- .../tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid index dd9d0b78f87..def1d6f839c 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid @@ -1,6 +1,8 @@ +caption: Fourth-Caption created: 20150221194405000 -modified: 20211114013601188 +modified: 20230721201835892 tags: Contents [[Table-of-Contents Demonstrations]] title: Fourth +type: text/vnd.tiddlywiki <<.toc-lorem>> diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid index f8a51f8d2fb..cfd0d0d3aff 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid @@ -1,7 +1,9 @@ +caption: Third-Caption created: 20150221194436000 list: ThirdOne ThirdTwo ThirdThree -modified: 20211114013601191 +modified: 20230721201857945 tags: Contents [[Table-of-Contents Demonstrations]] title: Third +type: text/vnd.tiddlywiki <<.toc-lorem>> From bfa2d9858a7671641ecec319c91fef47027d60a0 Mon Sep 17 00:00:00 2001 From: pmario Date: Sat, 22 Jul 2023 13:33:20 +0200 Subject: [PATCH 3/3] reset modified fields --- .../tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid | 2 +- .../demonstrations/TableOfContents/SecondThreeThree.tid | 2 +- .../tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid index def1d6f839c..cdd9850d8c7 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid @@ -1,6 +1,6 @@ caption: Fourth-Caption created: 20150221194405000 -modified: 20230721201835892 +modified: 20211114013601188 tags: Contents [[Table-of-Contents Demonstrations]] title: Fourth type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid index db2961994dd..c7fdf343bde 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid @@ -1,5 +1,5 @@ created: 20150221194423000 -modified: 20230721191043033 +modified: 20211114013601189 tags: SecondThree [[Table-of-Contents Demonstrations]] title: SecondThreeThree toc-link: no diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid index cfd0d0d3aff..7e2c7c7e1c6 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid @@ -1,7 +1,7 @@ caption: Third-Caption created: 20150221194436000 list: ThirdOne ThirdTwo ThirdThree -modified: 20230721201857945 +modified: 20211114013601191 tags: Contents [[Table-of-Contents Demonstrations]] title: Third type: text/vnd.tiddlywiki