mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-12 11:10:27 +00:00
add global field names
This commit is contained in:
parent
d8662d4498
commit
4486c3f1e9
@ -17,6 +17,10 @@ tags: $:/tags/Macro
|
||||
\procedure toc-open-icon() $:/core/images/down-arrow
|
||||
\procedure toc-closed-icon() $:/core/images/right-arrow
|
||||
|
||||
\procedure toc-hide-field() toc-hide
|
||||
\procedure toc-include-field() toc-include
|
||||
\procedure toc-filter-field() toc-filter
|
||||
|
||||
<!-- helper functions for li class definitions -->
|
||||
\function tf.toc-itemClassFilter() [<selectedTiddler>get[text]match<currentTiddler>then[toc-item-selected]else[toc-item]]
|
||||
\function tf.toc-includeClass() [subfilter<tf.toc-include>match<currentTiddler>then[toc-item-include]]
|
||||
@ -26,15 +30,15 @@ tags: $:/tags/Macro
|
||||
\function tf.toc-itemClass() [<tf.toc-itemClassFilter>] [<tf.toc-includeClass>] [<tf.toc-filterClass>] [<tf.toc-hideClass>] +[join[ ]]
|
||||
|
||||
<!-- the following 3 functions need to use <currentTiddler> -->
|
||||
\function tf.toc-getHideText() [<currentTiddler>get[toc-hide]]
|
||||
\function tf.toc-getHideText() [<currentTiddler>get<toc-hide-field>]
|
||||
\function tf.toc-hideIsYes() [<currentTiddler>format:titlelist[]]
|
||||
|
||||
<!-- Special case, if toc-hide field is "yes", we need a currentTiddler *titlelist* -- otherwise return the content as text -->
|
||||
\function tf.toc-hide() [<tf.toc-getHideText>match[yes]then<tf.toc-hideIsYes>] :else[<tf.toc-getHideText>]
|
||||
|
||||
<!-- tf.toc-include and tf.toc-filter need to use <tag> -->
|
||||
\function tf.toc-include() [<tag>get[toc-include]]
|
||||
\function tf.toc-filter() [<tag>get[toc-filter]]
|
||||
\function tf.toc-include() [<tag>get<toc-include-field>]
|
||||
\function tf.toc-filter() [<tag>get<toc-filter-field>]
|
||||
|
||||
<!-- define unique path based state title -->
|
||||
\function tf.toc-newPath() [<path>addsuffix[/]addsuffix<tag>]
|
||||
@ -167,7 +171,7 @@ Shows an expandable toc. Item always have an open/close chevron
|
||||
</ol>
|
||||
\end
|
||||
|
||||
\function tf.toc-curTidInclude() [<currentTiddler>get[toc-include]]
|
||||
\function tf.toc-curTidInclude() [<currentTiddler>get<toc-include-field>]
|
||||
|
||||
\procedure toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
|
||||
<$qualify name="toc-state" title=<<tf.toc-stateTitle>>>
|
||||
|
@ -1,5 +1,3 @@
|
||||
created: 20220728145919904
|
||||
list: Brackets Base64 HelloThere GettingStarted Community
|
||||
modified: 20220728145919904
|
||||
list: [[Draft of 'test-contacts']] [[b b]]
|
||||
title: $:/StoryList
|
||||
type: text/vnd.tiddlywiki
|
@ -0,0 +1,6 @@
|
||||
created: 20240204164044449
|
||||
modified: 20240204164141059
|
||||
title: $:/config/TextEditor/EditorHeight/Height
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
400px;
|
@ -0,0 +1,6 @@
|
||||
created: 20240204164038858
|
||||
modified: 20240204164143744
|
||||
title: $:/config/TextEditor/EditorHeight/Mode
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
fixed
|
@ -0,0 +1,6 @@
|
||||
created: 20240201195012281
|
||||
modified: 20240203002807686
|
||||
title: $:/themes/tiddlywiki/vanilla/metrics/sidebarwidth
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
450px
|
44
editions/tw5.com/tiddlers/Draft of 'test-contacts'.tid
Normal file
44
editions/tw5.com/tiddlers/Draft of 'test-contacts'.tid
Normal file
@ -0,0 +1,44 @@
|
||||
created: 20240204014515455
|
||||
draft.of: test-contacts
|
||||
draft.title: test-contacts
|
||||
modified: 20240205200935576
|
||||
tags:
|
||||
title: Draft of 'test-contacts'
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<style>
|
||||
.toc-item-filter> a,
|
||||
.toc-item-filter> .tc-toc-caption {
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
.toc-item-filter> button > svg {
|
||||
fill: darkblue;
|
||||
}
|
||||
|
||||
.toc-item-include > a,
|
||||
.toc-item-include > .tc-toc-caption
|
||||
{
|
||||
color: green;
|
||||
}
|
||||
|
||||
.toc-item-include > button > svg {
|
||||
fill: green;
|
||||
}
|
||||
|
||||
.toc-item-hide> a,
|
||||
.toc-item-hide > .tc-toc-caption
|
||||
{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.toc-item-hide> button > svg {
|
||||
fill: red;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
<<toc "root">>
|
||||
</div>
|
7
editions/tw5.com/tiddlers/MR.tid
Normal file
7
editions/tw5.com/tiddlers/MR.tid
Normal file
@ -0,0 +1,7 @@
|
||||
created: 20240204014414845
|
||||
first-name: Robert
|
||||
last-name: Müller
|
||||
modified: 20240204030403210
|
||||
tags: person
|
||||
title: MR
|
||||
type: text/vnd.tiddlywiki
|
10
editions/tw5.com/tiddlers/New Tiddler 1.tid
Normal file
10
editions/tw5.com/tiddlers/New Tiddler 1.tid
Normal file
@ -0,0 +1,10 @@
|
||||
created: 20240201200126315
|
||||
modified: 20240204013212392
|
||||
tags:
|
||||
title: New Tiddler 1
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
<<toc "root">>
|
||||
</div>
|
||||
|
16
editions/tw5.com/tiddlers/New Tiddler 2.tid
Normal file
16
editions/tw5.com/tiddlers/New Tiddler 2.tid
Normal file
@ -0,0 +1,16 @@
|
||||
created: 20240202131409493
|
||||
modified: 20240202223322380
|
||||
tags: aaa
|
||||
title: New Tiddler 2
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<$let
|
||||
myFilter="[tag[aaa]]"
|
||||
toc-exclude-yes="[<currentTiddler>]"
|
||||
toc-exclude="[[b b]]"
|
||||
toc-include="[tag[test]]"
|
||||
|
||||
toc-exclude={{{ [<toc-exclude>match[yes]then<toc-exclude-yes>else<toc-exclude>] }}}
|
||||
>
|
||||
|
||||
<$list filter="[subfilter<myFilter>] [subfilter<toc-include>] -[subfilter<toc-exclude>]"/>
|
5
editions/tw5.com/tiddlers/New Tiddler 3.tid
Normal file
5
editions/tw5.com/tiddlers/New Tiddler 3.tid
Normal file
@ -0,0 +1,5 @@
|
||||
created: 20240204045534918
|
||||
modified: 20240204045536437
|
||||
tags: todo1
|
||||
title: New Tiddler 3
|
||||
type: text/vnd.tiddlywiki
|
7
editions/tw5.com/tiddlers/SR.tid
Normal file
7
editions/tw5.com/tiddlers/SR.tid
Normal file
@ -0,0 +1,7 @@
|
||||
created: 20240204014347171
|
||||
first-name: Robert
|
||||
last-name: Schlager
|
||||
modified: 20240204014450686
|
||||
tags: person
|
||||
title: SR
|
||||
type: text/vnd.tiddlywiki
|
@ -0,0 +1,6 @@
|
||||
created: 20240201204233476
|
||||
modified: 20240201205239293
|
||||
title: _/state/popup/toc/useGlobal
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
yes
|
5
editions/tw5.com/tiddlers/aaa.tid
Normal file
5
editions/tw5.com/tiddlers/aaa.tid
Normal file
@ -0,0 +1,5 @@
|
||||
created: 20240202131427117
|
||||
modified: 20240203012638744
|
||||
tags: root [[b b]] aaa
|
||||
title: aaa
|
||||
type: text/vnd.tiddlywiki
|
5
editions/tw5.com/tiddlers/asdf.tid
Normal file
5
editions/tw5.com/tiddlers/asdf.tid
Normal file
@ -0,0 +1,5 @@
|
||||
created: 20240202112653767
|
||||
modified: 20240202112700329
|
||||
tags: one
|
||||
title: asdf
|
||||
type: text/vnd.tiddlywiki
|
17
editions/tw5.com/tiddlers/b b.tid
Normal file
17
editions/tw5.com/tiddlers/b b.tid
Normal file
@ -0,0 +1,17 @@
|
||||
created: 20240202131440055
|
||||
modified: 20240205195920345
|
||||
tags: aaa
|
||||
title: b b
|
||||
toc-filter:
|
||||
toc-hide:
|
||||
toc-include: [prefix[todo]]
|
||||
toc-includeX: [prefix[todo]]
|
||||
toc-link:
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
{{{ [subfilter<tf.toc-exclude>] }}}
|
||||
|
||||
{{{ [{read-only-mode}match[yes]then<currentTiddler>] }}}
|
||||
|
||||
|
||||
{{{ [tag[todo]!tag[done]] +[!sort[modified]] }}}
|
5
editions/tw5.com/tiddlers/ccc.tid
Normal file
5
editions/tw5.com/tiddlers/ccc.tid
Normal file
@ -0,0 +1,5 @@
|
||||
created: 20240202225320834
|
||||
modified: 20240204011950080
|
||||
tags: [[b b]]
|
||||
title: ccc
|
||||
type: text/vnd.tiddlywiki
|
6
editions/tw5.com/tiddlers/contacts.tid
Normal file
6
editions/tw5.com/tiddlers/contacts.tid
Normal file
@ -0,0 +1,6 @@
|
||||
created: 20240204014534832
|
||||
modified: 20240205180618408
|
||||
tags: root
|
||||
title: contacts
|
||||
toc-include: [tag[person]sort[last-name]]
|
||||
type: text/vnd.tiddlywiki
|
@ -0,0 +1,23 @@
|
||||
created: 20240202103010434
|
||||
modified: 20240202103557952
|
||||
tags:
|
||||
title: creative-way-to-use-functions-01
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\function f.taggedList(tag) [tag<tag>limit[3]]
|
||||
\function f.opFields() [fields[]prefix[op]] -[[text]] -[[title]]
|
||||
|
||||
<$list filter="[f.taggedList[Filter Operators]]">
|
||||
<table class="tc-max-width">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan=2><$link/></th>
|
||||
</tr>
|
||||
<$list filter="[<currentTiddler>f.opFields[]]" variable=fieldname>
|
||||
<tr>
|
||||
<td><<fieldname>></td><td><$transclude $field=<<fieldname>>/></td>
|
||||
</tr>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
</$list>
|
@ -0,0 +1,24 @@
|
||||
created: 20240202094222684
|
||||
modified: 20240202103555585
|
||||
tags:
|
||||
title: creative-way-to-use-functions-02
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\function f.taggedList(test, tag) [<test>] [tag<tag>limit[3]]
|
||||
\function f.opFields() [fields[]prefix[op]] -[[text]] -[[title]]
|
||||
|
||||
<$list filter="[function[f.taggedList],[non existing Title],[Filter Operators]]">
|
||||
<table class="tc-max-width">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan=2><$link/></th>
|
||||
</tr>
|
||||
<$list filter="[<currentTiddler>function[f.opFields]]" variable=fieldname>
|
||||
<tr>
|
||||
<td><<fieldname>></td><td><$transclude $field=<<fieldname>>/></td>
|
||||
</tr>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
</$list>
|
||||
|
5
editions/tw5.com/tiddlers/ddd.tid
Normal file
5
editions/tw5.com/tiddlers/ddd.tid
Normal file
@ -0,0 +1,5 @@
|
||||
created: 20240203010827945
|
||||
modified: 20240204175634987
|
||||
tags: [[b b]]
|
||||
title: ddd
|
||||
type: text/vnd.tiddlywiki
|
@ -1,6 +1,8 @@
|
||||
created: 20150221194408000
|
||||
modified: 20211114013601190
|
||||
modified: 20240203175856801
|
||||
tags: Contents [[Table-of-Contents Demonstrations]]
|
||||
title: Second
|
||||
toc-xxx: yes
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.toc-lorem>>
|
||||
|
5
editions/tw5.com/tiddlers/eee.tid
Normal file
5
editions/tw5.com/tiddlers/eee.tid
Normal file
@ -0,0 +1,5 @@
|
||||
created: 20240203012325174
|
||||
modified: 20240203013847790
|
||||
tags: z [[New Tiddler 2]]
|
||||
title: eee
|
||||
type: text/vnd.tiddlywiki
|
7
editions/tw5.com/tiddlers/pmario.tid
Normal file
7
editions/tw5.com/tiddlers/pmario.tid
Normal file
@ -0,0 +1,7 @@
|
||||
created: 20240204014317494
|
||||
first-name: Mario
|
||||
last-name: Pietsch
|
||||
modified: 20240204014456821
|
||||
tags: person
|
||||
title: pmario
|
||||
type: text/vnd.tiddlywiki
|
7
editions/tw5.com/tiddlers/read-only-mode.tid
Normal file
7
editions/tw5.com/tiddlers/read-only-mode.tid
Normal file
@ -0,0 +1,7 @@
|
||||
created: 20240204002222736
|
||||
modified: 20240204002230160
|
||||
tags:
|
||||
title: read-only-mode
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
yes
|
42
editions/tw5.com/tiddlers/test-contacts.tid
Normal file
42
editions/tw5.com/tiddlers/test-contacts.tid
Normal file
@ -0,0 +1,42 @@
|
||||
created: 20240204014515455
|
||||
modified: 20240205200223848
|
||||
tags:
|
||||
title: test-contacts
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<style>
|
||||
.toc-item-filter> a,
|
||||
.toc-item-filter> .tc-toc-caption {
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
.toc-item-filter> button > svg {
|
||||
fill: darkblue;
|
||||
}
|
||||
|
||||
.toc-item-include > a,
|
||||
.toc-item-include > .tc-toc-caption
|
||||
{
|
||||
color: green;
|
||||
}
|
||||
|
||||
.toc-item-include > button > svg {
|
||||
fill: green;
|
||||
}
|
||||
|
||||
.toc-item-hide> a,
|
||||
.toc-item-hide > .tc-toc-caption
|
||||
{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.toc-item-hide> button > svg {
|
||||
fill: red;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
<<toc "root">>
|
||||
</div>
|
17
editions/tw5.com/tiddlers/test-exclude-show-empty-text.tid
Normal file
17
editions/tw5.com/tiddlers/test-exclude-show-empty-text.tid
Normal file
@ -0,0 +1,17 @@
|
||||
created: 20240202112417445
|
||||
modified: 20240202131358311
|
||||
tags: test
|
||||
title: test-exclude-show-empty-text
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<$let
|
||||
myFilter="[tag[one]]"
|
||||
toc-exclude-yes="[<currentTiddler>]]"
|
||||
toc-exclude="yesX"
|
||||
toc-include="[tag[test]sort[created]]"
|
||||
|
||||
toc-exclude={{{ [<toc-exclude>match[yes]then<toc-exclude-yes>else<toc-exclude>] }}}
|
||||
>
|
||||
|
||||
<$list filter="[subfilter<myFilter>] [subfilter<toc-include>] -[subfilter<toc-exclude>]" emptyMessage="toc-exclude - removed everything"/>
|
||||
|
16
editions/tw5.com/tiddlers/test-toc-include-toc-exclude.tid
Normal file
16
editions/tw5.com/tiddlers/test-toc-include-toc-exclude.tid
Normal file
@ -0,0 +1,16 @@
|
||||
code-body: yes
|
||||
created: 20240202112158339
|
||||
modified: 20240202114434232
|
||||
tags: one
|
||||
title: test-toc-include-toc-exclude
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<$let myFilter="[tag[one]]"
|
||||
toc-exclude-yes="[<currentTiddler>]"
|
||||
toc-exclude="asdf"
|
||||
toc-include="[tag[test]]"
|
||||
|
||||
toc-exclude={{{ [<toc-exclude>match[yes]then<toc-exclude-yes>else<toc-exclude>] }}}
|
||||
>
|
||||
|
||||
<$list filter="[subfilter<myFilter>] [subfilter<toc-include>] -[subfilter<toc-exclude>]"/>
|
11
editions/tw5.com/tiddlers/test-xxx.tid
Normal file
11
editions/tw5.com/tiddlers/test-xxx.tid
Normal file
@ -0,0 +1,11 @@
|
||||
created: 20240203175824154
|
||||
modified: 20240204002037300
|
||||
tags:
|
||||
title: test-xxx
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\function tf.toc-exclude() [<currentTiddler>get[toc-xxx]]
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
<<toc "Contents">>
|
||||
</div>
|
12
editions/tw5.com/tiddlers/test.tid
Normal file
12
editions/tw5.com/tiddlers/test.tid
Normal file
@ -0,0 +1,12 @@
|
||||
created: 20240202161649264
|
||||
modified: 20240205180207663
|
||||
tags:
|
||||
title: test
|
||||
toc-include: asdf
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
<$macrocall $name=toc tag=root />
|
||||
</div>
|
||||
|
10
editions/tw5.com/tiddlers/toc-basic.tid
Normal file
10
editions/tw5.com/tiddlers/toc-basic.tid
Normal file
@ -0,0 +1,10 @@
|
||||
created: 20240201132228945
|
||||
modified: 20240201145229473
|
||||
tags:
|
||||
title: toc-basic
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<div class="tc-table-of-contents" >
|
||||
<<toc "Contents" sort:"sort[title]" exclude:FirstOneX>>
|
||||
</div>
|
||||
|
10
editions/tw5.com/tiddlers/toc-expandable.tid
Normal file
10
editions/tw5.com/tiddlers/toc-expandable.tid
Normal file
@ -0,0 +1,10 @@
|
||||
created: 20240201145231868
|
||||
modified: 20240201161435056
|
||||
tags:
|
||||
title: toc-expandable
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<div class="tc-table-of-contents" >
|
||||
<<toc-selective-expandable "Contents" sort:"sort[title]" exclude:"FirstOne FirstThreeX FirstTwoX">>
|
||||
</div>
|
||||
|
6
editions/tw5.com/tiddlers/todo1.tid
Normal file
6
editions/tw5.com/tiddlers/todo1.tid
Normal file
@ -0,0 +1,6 @@
|
||||
created: 20240204010938186
|
||||
modified: 20240204052314378
|
||||
tags: todo
|
||||
title: todo1
|
||||
toc-link: no
|
||||
type: text/vnd.tiddlywiki
|
5
editions/tw5.com/tiddlers/todo2.tid
Normal file
5
editions/tw5.com/tiddlers/todo2.tid
Normal file
@ -0,0 +1,5 @@
|
||||
created: 20240204010944841
|
||||
modified: 20240204012556472
|
||||
tags: todo
|
||||
title: todo2
|
||||
type: text/vnd.tiddlywiki
|
12
editions/tw5.com/tiddlers/toggle-global.tid
Normal file
12
editions/tw5.com/tiddlers/toggle-global.tid
Normal file
@ -0,0 +1,12 @@
|
||||
created: 20240201200204741
|
||||
modified: 20240201204212302
|
||||
tags:
|
||||
title: toggle-global
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define xyyyx()
|
||||
<$action-deletetiddler $tiddler="_/state/popup/toc/useGlobal"/>
|
||||
\end
|
||||
<$checkbox tiddler="_/state/popup/toc/useGlobal" field="text" checked="yes" unchecked="no" default="no" uncheckactions=<<xx>>> Use TOC global state</$checkbox>
|
||||
|
||||
[[_/state/popup/toc/useGlobal]]
|
Loading…
Reference in New Issue
Block a user