1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-04 15:29:56 +00:00

fix chevron spacing for custom itemTemplates

This commit is contained in:
pmario 2024-05-13 14:10:29 +02:00
parent 63fc0bc562
commit e9d009a6a6

View File

@ -27,7 +27,7 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc
<$let tv-wikilinks="no" <$let tv-wikilinks="no"
field={{{ [<currentTiddler>] :cascade[<_hasItemTemplate>append<_hasCaptionField>append<_hasCaption>append[title]] }}} field={{{ [<currentTiddler>] :cascade[<_hasItemTemplate>append<_hasCaptionField>append<_hasCaption>append[title]] }}}
> >
<span class="tc-tiny-gap-left" <span class=""
data-fieldClass=`field-$(field)$` data-fieldClass=`field-$(field)$`
title={{{ [{!!toc-tooltip}!is[blank]] :else[<currentTiddler>] }}} title={{{ [{!!toc-tooltip}!is[blank]] :else[<currentTiddler>] }}}
> >
@ -38,7 +38,7 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc
<!-- <!--
Check if a user defined item template should be used. Check if a user defined item template should be used.
It can be a macro parameter: itemTemplate or a tiddler field: toc-itemTemplate. It can be a macro parameter: itemTemplate or a tiddler field: toc-itemTemplate.
--> -->
\function tf.toc-getItemTemplateTitle() [<currentTiddler>get[toc-itemTemplate]] :filter[has[text]] :else[<itemTemplate>has[text]then<itemTemplate>] \function tf.toc-getItemTemplateTitle() [<currentTiddler>get[toc-itemTemplate]] :filter[has[text]] :else[<itemTemplate>has[text]then<itemTemplate>]
@ -200,7 +200,7 @@ v5.3.4 itemClassFilter has been replaced by tf.toc-itemClassFilter see: tf.toc-i
\procedure toc-item(isUnlinked:"") \procedure toc-item(isUnlinked:"")
<% if [<toc-state>get[text]else[close]match[close]] %> <% if [<toc-state>get[text]else[close]match[close]] %>
<!-- <$button actions=<<toc-openBranch>> setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible" tooltip=<<toc-state>>> --> <!-- <$button actions=<<toc-openBranch>> setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible" tooltip=<<toc-state>>> -->
<$button actions=<<toc-openBranch>> setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible"> <$button actions=<<toc-openBranch>> setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-tiny-gap-right">
<$transclude tiddler=<<toc-closed-icon>> /> <$transclude tiddler=<<toc-closed-icon>> />
<% if [<isUnlinked>match[yes]] %> <% if [<isUnlinked>match[yes]] %>
<<_itemTemplate>> <<_itemTemplate>>
@ -208,7 +208,7 @@ v5.3.4 itemClassFilter has been replaced by tf.toc-itemClassFilter see: tf.toc-i
</$button> </$button>
<% elseif [<toc-state>get[text]match[open]] %> <% elseif [<toc-state>get[text]match[open]] %>
<!-- <$button actions=<<toc-closeBranch>> setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible" tooltip=<<toc-state>>> --> <!-- <$button actions=<<toc-closeBranch>> setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible" tooltip=<<toc-state>>> -->
<$button actions=<<toc-closeBranch>> setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible"> <$button actions=<<toc-closeBranch>> setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-tiny-gap-right">
<$transclude tiddler=<<toc-open-icon>> /> <$transclude tiddler=<<toc-open-icon>> />
<% if [<isUnlinked>match[yes]] %> <% if [<isUnlinked>match[yes]] %>
<<_itemTemplate>> <<_itemTemplate>>
@ -298,7 +298,7 @@ Shows an expandable toc. Item always have an open/close chevron
<% if [subfilter<tf.toc-hasChildren>] [subfilter<tf.toc-curTidInclude>] -[<currentTiddler>] -[subfilter<exclude>] +[limit[1]] %> <% if [subfilter<tf.toc-hasChildren>] [subfilter<tf.toc-curTidInclude>] -[<currentTiddler>] -[subfilter<exclude>] +[limit[1]] %>
<<toc-item>> <<toc-item>>
<% else %> <% else %>
<$button class='tc-btn-invisible' tabindex="-1"> <$button class='tc-btn-invisible tc-tiny-gap-right' tabindex="-1">
{{$:/core/images/blank}} {{$:/core/images/blank}}
</$button> </$button>
<% endif %> <% endif %>
@ -334,7 +334,7 @@ Shows an expandable toc. Item always have an open/close chevron
<% if [subfilter<tf.toc-hasChildren>] [subfilter<tf.toc-curTidInclude>] -[<currentTiddler>] -[subfilter<exclude>] +[limit[1]] %> <% if [subfilter<tf.toc-hasChildren>] [subfilter<tf.toc-curTidInclude>] -[<currentTiddler>] -[subfilter<exclude>] +[limit[1]] %>
<<toc-item isUnlinked:"yes">> <<toc-item isUnlinked:"yes">>
<% else %> <% else %>
<$button class="tc-btn-invisible"> <$button class="tc-btn-invisible tc-tiny-gap-right">
{{$:/core/images/blank}} {{$:/core/images/blank}}
</$button> </$button>
<span class="toc-item-muted"> <span class="toc-item-muted">