mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-07-04 02:52:52 +00:00
toc - add new preliminary tests
This commit is contained in:
parent
780cf038ab
commit
55d09792af
40
editions/tw5.com/tiddlers/test-Contents-toc-hide.tid
Normal file
40
editions/tw5.com/tiddlers/test-Contents-toc-hide.tid
Normal 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>
|
||||||
|
|
@ -1,10 +1,9 @@
|
|||||||
created: 20240203175824154
|
created: 20240203175824154
|
||||||
modified: 20240208172040360
|
modified: 20240213183451394
|
||||||
tags: testTOC
|
tags: testTOC
|
||||||
title: test-Contents
|
title: test-Contents
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
\function tf.toc-exclude() [<currentTiddler>get[toc-xxx]]
|
|
||||||
|
|
||||||
<div class="tc-table-of-contents">
|
<div class="tc-table-of-contents">
|
||||||
<<toc "Contents">>
|
<<toc "Contents">>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
created: 20240206215732068
|
created: 20240206215732068
|
||||||
modified: 20240208172053096
|
modified: 20240213202254561
|
||||||
tags: testTOC
|
tags: testTOC
|
||||||
title: test-parent-field-toc
|
title: test-parent-field-toc
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
@ -4,31 +4,31 @@ tags: $:/tags/Stylesheet testTOC
|
|||||||
title: test-styles
|
title: test-styles
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
.toc-item-filter> a,
|
.tc-toc-filter> a,
|
||||||
.toc-item-filter> .tc-toc-caption {
|
.tc-toc-filter> .tc-toc-caption {
|
||||||
color: darkviolet;
|
color: darkviolet;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-item-filter> button > svg {
|
.tc-toc-filter> button > svg {
|
||||||
fill: darkviolet;
|
fill: darkviolet;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-item-include > a,
|
.tc-toc-include > a,
|
||||||
.toc-item-include > .tc-toc-caption
|
.tc-toc-include > .tc-toc-caption
|
||||||
{
|
{
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-item-include > button > svg {
|
.tc-toc-include > button > svg {
|
||||||
fill: green;
|
fill: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-item-hide> a,
|
.tc-toc-hide> a,
|
||||||
.toc-item-hide > .tc-toc-caption
|
.tc-toc-hide > .tc-toc-caption
|
||||||
{
|
{
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-item-hide> button > svg {
|
.tc-toc-hide> button > svg {
|
||||||
fill: red;
|
fill: red;
|
||||||
}
|
}
|
||||||
|
12
editions/tw5.com/tiddlers/toc-1.1.1-hidden.tid
Normal file
12
editions/tw5.com/tiddlers/toc-1.1.1-hidden.tid
Normal 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>>
|
11
editions/tw5.com/tiddlers/toc-1.1.2.tid
Normal file
11
editions/tw5.com/tiddlers/toc-1.1.2.tid
Normal 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>>
|
11
editions/tw5.com/tiddlers/toc-1.1.tid
Normal file
11
editions/tw5.com/tiddlers/toc-1.1.tid
Normal 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>>
|
5
editions/tw5.com/tiddlers/toc-1.2.1.a.tid
Normal file
5
editions/tw5.com/tiddlers/toc-1.2.1.a.tid
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
created: 20240213184633437
|
||||||
|
modified: 20240213184644506
|
||||||
|
tags: toc-1.2.1
|
||||||
|
title: toc-1.2.1.a
|
||||||
|
type: text/vnd.tiddlywiki
|
11
editions/tw5.com/tiddlers/toc-1.2.1.tid
Normal file
11
editions/tw5.com/tiddlers/toc-1.2.1.tid
Normal 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>>
|
11
editions/tw5.com/tiddlers/toc-1.2.tid
Normal file
11
editions/tw5.com/tiddlers/toc-1.2.tid
Normal 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>>
|
Loading…
x
Reference in New Issue
Block a user