1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 18:39:54 +00:00

Minor tweaks to new tiddler Explorer

This commit is contained in:
Jermolene 2017-06-09 15:31:55 +01:00
parent 1e9d214f67
commit 9c57ebb05d
4 changed files with 4 additions and 48 deletions

View File

@ -3,6 +3,7 @@ title: $:/language/SideBar/
All/Caption: All
Contents/Caption: Contents
Drafts/Caption: Drafts
Explorer/Caption: Explorer
Missing/Caption: Missing
More/Caption: More
Open/Caption: Open

View File

@ -1,6 +1,6 @@
title: $:/core/ui/MoreSideBar/System-Explorer
title: $:/core/ui/MoreSideBar/Explorer
tags: $:/tags/MoreSideBar
caption: {{$:/language/SideBar/System-Explorer/Caption}}
caption: {{$:/language/SideBar/Explorer/Caption}}
\define cleanChunk()
<$list filter="[[$(chunk)$]] +[removesuffix[/]]" variable="cleanChunk">
@ -30,15 +30,12 @@ emptyMessage="""<$text text="$prefix$$(chunk)$"/>""">
<$button set="""$:/state/tree/$prefix$$(chunk)$""" setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}}</$button>
</$reveal>
</$list>
<<cleanChunk>>
<$list filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]""">(<$count filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]]"""/>)
<$reveal type="match" state="""$:/state/tree/$prefix$$(chunk)$""" text="show">
<$macrocall $name="tree" prefix="""$prefix$$(chunk)$"""/>
</$reveal>
</$list>
</li>
</$reveal>
\end
@ -48,7 +45,6 @@ emptyMessage="""<$text text="$prefix$$(chunk)$"/>""">
<$list filter="[all[shadows+tiddlers]removeprefix[$prefix$]splitbefore[/]sort[title]] +[!suffix[/]]" variable="chunk">
<<leafnode """$prefix$""">>
</$list>
<$list filter="[all[shadows+tiddlers]removeprefix[$prefix$]splitbefore[/]sort[title]] +[suffix[/]]" variable="chunk">
<<branchnode """$prefix$""">>
</$list>

View File

@ -1,3 +1,3 @@
title: $:/tags/MoreSideBar
list: [[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]] [[$:/core/ui/MoreSideBar/Plugins]]
list: [[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]] [[$:/core/ui/MoreSideBar/Explorer]] [[$:/core/ui/MoreSideBar/Plugins]]

View File

@ -1,41 +0,0 @@
title: $:/core/ui/MoreSideBar/Explore
tags: $:/tags/MoreSideBar
caption: Explore
\define treenode-inner(prefix)
<$reveal type="nomatch" text="" default="""$(chunk)$""">
<li>
<$list filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]""" emptyMessage="""<button class="tc-btn-invisible" disabled>{{$:/core/images/blank}}</button>""">
<$reveal type="nomatch" state="""$:/state/tree/$prefix$$(chunk)$""" text="show">
<$button set="""$:/state/tree/$prefix$$(chunk)$""" setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}}</$button>
</$reveal>
<$reveal type="match" state="""$:/state/tree/$prefix$$(chunk)$""" text="show">
<$button set="""$:/state/tree/$prefix$$(chunk)$""" setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}}</$button>
</$reveal>
</$list>
<$list filter="""[[$prefix$$(chunk)$]is[shadow]] [[$prefix$$(chunk)$]is[tiddler]] +[limit[1]]""" emptyMessage="""<$text text="$prefix$$(chunk)$"/>""">
<$link>
<$view field="title"/>
</$link>
</$list>
<$list filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]""">
(<$count filter="""[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]]"""/>)
<$reveal type="match" state="""$:/state/tree/$prefix$$(chunk)$""" text="show">
<$macrocall $name="treenode" prefix="""$prefix$$(chunk)$"""/>
</$reveal>
</$list>
</li>
</$reveal>
\end
\define treenode(prefix)
<ol>
<$list filter="[all[shadows+tiddlers]removeprefix[$prefix$]splitbefore[/]sort[title]]" variable="chunk">
<<treenode-inner """$prefix$""">>
</$list>
</ol>
\end
<div class="tc-table-of-contents">
<<treenode "$:/">>
</div>