mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Toc cosmetic changes for tabbed-xxxx macros (#4101)
* toc cosmetic changes. * toc in right sidebar should use toc-item if itemCalssFilter is not defined
This commit is contained in:
parent
e2bad34e89
commit
5d36b484c6
@ -14,7 +14,7 @@ tags: $:/tags/Macro
|
|||||||
<$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]""">
|
<$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]""">
|
||||||
<$vars item=<<currentTiddler>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}>
|
<$vars item=<<currentTiddler>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}>
|
||||||
<$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]""">
|
<$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]""">
|
||||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
|
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||||
<li class=<<toc-item-class>>>
|
<li class=<<toc-item-class>>>
|
||||||
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/></$view></$link>">
|
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/></$view></$link>">
|
||||||
<<toc-caption>>
|
<<toc-caption>>
|
||||||
@ -35,7 +35,7 @@ tags: $:/tags/Macro
|
|||||||
\define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
|
\define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
|
||||||
<!-- helper function -->
|
<!-- helper function -->
|
||||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
|
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||||
<li class=<<toc-item-class>>>
|
<li class=<<toc-item-class>>>
|
||||||
<$link>
|
<$link>
|
||||||
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
||||||
@ -58,10 +58,10 @@ tags: $:/tags/Macro
|
|||||||
</$qualify>
|
</$qualify>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
|
\define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
|
||||||
<!-- helper function -->
|
<!-- helper function -->
|
||||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
|
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||||
<li class=<<toc-item-class>>>
|
<li class=<<toc-item-class>>>
|
||||||
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
||||||
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
||||||
@ -101,9 +101,9 @@ tags: $:/tags/Macro
|
|||||||
</$vars>
|
</$vars>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
|
\define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
|
||||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected" >
|
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item" >
|
||||||
<li class=<<toc-item-class>>>
|
<li class=<<toc-item-class>>>
|
||||||
<$link>
|
<$link>
|
||||||
<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>">
|
<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>">
|
||||||
@ -128,9 +128,9 @@ tags: $:/tags/Macro
|
|||||||
</$qualify>
|
</$qualify>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
|
\define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
|
||||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
|
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||||
<li class=<<toc-item-class>>>
|
<li class=<<toc-item-class>>>
|
||||||
<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
|
<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
|
||||||
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
||||||
@ -177,7 +177,7 @@ tags: $:/tags/Macro
|
|||||||
<div class="tc-tabbed-table-of-contents">
|
<div class="tc-tabbed-table-of-contents">
|
||||||
<$linkcatcher to=<<__selectedTiddler__>>>
|
<$linkcatcher to=<<__selectedTiddler__>>>
|
||||||
<div class="tc-table-of-contents">
|
<div class="tc-table-of-contents">
|
||||||
<$macrocall $name="toc-selective-expandable" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter="[all[current]field:title<__selectedTiddler__>]"/>
|
<$macrocall $name="toc-selective-expandable" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter="[all[current]] -[<__selectedTiddler__>get[text]]"/>
|
||||||
</div>
|
</div>
|
||||||
</$linkcatcher>
|
</$linkcatcher>
|
||||||
<div class="tc-tabbed-table-of-contents-content">
|
<div class="tc-tabbed-table-of-contents-content">
|
||||||
|
Loading…
Reference in New Issue
Block a user