1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-05 10:16:57 +00:00

toc - add new preliminary tests

This commit is contained in:
pmario 2024-02-14 13:41:43 +01:00
parent 780cf038ab
commit 55d09792af
10 changed files with 112 additions and 12 deletions

View File

@ -0,0 +1,40 @@
created: 20240213183404352
modified: 20240213195440187
tags: testTOC
title: test-Contents-toc-hide
type: text/vnd.tiddlywiki
\procedure openBranch()
<<toc-openBranch path:"/" currentTiddler:"test-Contents-toc-hide" manual:yes>>
\end
\procedure closeBranch()
<<toc-closeBranch path:"/" currentTiddler:"test-Contents-toc-hide" manual:yes>>
\end
<$button actions=<<openBranch>>>Open Tree</$button>
<$button actions=<<closeBranch>>>Close Tree</$button>
[[toc-1.1.1-hidden]] contains a field: `toc-hide: yes`
The following examples uses the `toc-hide: yes` field in the currentTiddler to exclude a tiddler from the current branch
<div class="tc-table-of-contents">
<<toc-selective-expandable tag:"test-Contents-toc-hide">>
</div>
The following examples uses: `exclude:"[toc-hide[yes]]"`, which allows you to use any field name with a specific value to be excluded from every branch
<div class="tc-table-of-contents">
<<toc-selective-expandable tag:"test-Contents-toc-hide" exclude:"[toc-hide[yes]]">>
</div>
----------
simple toc as a reference
<div class="tc-table-of-contents">
<<toc "test-Contents-toc-hide">>
</div>

View File

@ -1,10 +1,9 @@
created: 20240203175824154
modified: 20240208172040360
modified: 20240213183451394
tags: testTOC
title: test-Contents
type: text/vnd.tiddlywiki
\function tf.toc-exclude() [<currentTiddler>get[toc-xxx]]
<div class="tc-table-of-contents">
<<toc "Contents">>

View File

@ -1,5 +1,5 @@
created: 20240206215732068
modified: 20240208172053096
modified: 20240213202254561
tags: testTOC
title: test-parent-field-toc
type: text/vnd.tiddlywiki

View File

@ -4,31 +4,31 @@ tags: $:/tags/Stylesheet testTOC
title: test-styles
type: text/vnd.tiddlywiki
.toc-item-filter> a,
.toc-item-filter> .tc-toc-caption {
.tc-toc-filter> a,
.tc-toc-filter> .tc-toc-caption {
color: darkviolet;
}
.toc-item-filter> button > svg {
.tc-toc-filter> button > svg {
fill: darkviolet;
}
.toc-item-include > a,
.toc-item-include > .tc-toc-caption
.tc-toc-include > a,
.tc-toc-include > .tc-toc-caption
{
color: green;
}
.toc-item-include > button > svg {
.tc-toc-include > button > svg {
fill: green;
}
.toc-item-hide> a,
.toc-item-hide > .tc-toc-caption
.tc-toc-hide> a,
.tc-toc-hide > .tc-toc-caption
{
color: red;
}
.toc-item-hide> button > svg {
.tc-toc-hide> button > svg {
fill: red;
}

View File

@ -0,0 +1,12 @@
created: 20240213183620916
modified: 20240213185853339
tags: toc-1.1
title: toc-1.1.1-hidden
toc-hide: yes
type: text/vnd.tiddlywiki
\import [[b b]]
See: [[test-Contents-toc-hide]]
<<list-fields>>

View File

@ -0,0 +1,11 @@
created: 20240213190016388
modified: 20240213195507153
tags: toc-1.1X toc-1.1
title: toc-1.1.2
type: text/vnd.tiddlywiki
\import [[b b]]
See: [[test-Contents-toc-hide]]
<<list-fields>>

View File

@ -0,0 +1,11 @@
created: 20240213183533524
modified: 20240213185853339
tags: test-Contents-toc-hide
title: toc-1.1
type: text/vnd.tiddlywiki
\import [[b b]]
See: [[test-Contents-toc-hide]]
<<list-fields>>

View File

@ -0,0 +1,5 @@
created: 20240213184633437
modified: 20240213184644506
tags: toc-1.2.1
title: toc-1.2.1.a
type: text/vnd.tiddlywiki

View File

@ -0,0 +1,11 @@
created: 20240213183721922
modified: 20240213185844030
tags: toc-1.2
title: toc-1.2.1
type: text/vnd.tiddlywiki
\import [[b b]]
See: [[test-Contents-toc-hide]]
<<list-fields>>

View File

@ -0,0 +1,11 @@
created: 20240213183601309
modified: 20240213185844029
tags: test-Contents-toc-hide
title: toc-1.2
type: text/vnd.tiddlywiki
\import [[b b]]
See: [[test-Contents-toc-hide]]
<<list-fields>>