Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions core/wiki/macros/toc.tid
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,21 @@ tags: $:/tags/Macro
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
<li class=<<toc-item-class>>>
<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}>
<div class="tc-toc-item-row">
<$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" aria-label={{{ [<currentTiddler>addprefix[expand ]] }}}>
<$transclude tiddler=<<toc-closed-icon>> />
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep" aria-label={{{ [<currentTiddler>addprefix[collapse ]] }}}>
<$transclude tiddler=<<toc-open-icon>> />
</$button>
</$reveal>
<<toc-caption>>
</$link>
<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}>
<<toc-caption>>
</$link>
</div>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$macrocall $name="toc-expandable" tag=<<currentTiddler>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
</$reveal>
Expand All @@ -103,13 +105,13 @@ tags: $:/tags/Macro
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
<li class=<<toc-item-class>>>
<$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" aria-label={{{ [<currentTiddler>addprefix[expand ]] }}}>
<$transclude tiddler=<<toc-closed-icon>> />
<<toc-caption>>
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep" aria-label={{{ [<currentTiddler>addprefix[collapse ]] }}}>
<$transclude tiddler=<<toc-open-icon>> />
<<toc-caption>>
</$button>
Expand Down Expand Up @@ -146,21 +148,23 @@ tags: $:/tags/Macro
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item" >
<li class=<<toc-item-class>>>
<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}>
<$list filter="[all[current]tagging[]$sort$] -[subfilter<__exclude__>] +[limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>">
<div class="tc-toc-item-row">
<$list filter="[all[current]tagging[]$sort$] -[subfilter<__exclude__>] +[limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible' tabindex='-1'>{{$:/core/images/blank}}</$button>">
<$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" aria-label={{{ [<currentTiddler>addprefix[expand ]] }}}>
<$transclude tiddler=<<toc-closed-icon>> />
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep" aria-label={{{ [<currentTiddler>addprefix[collapse ]] }}}>
<$transclude tiddler=<<toc-open-icon>> />
</$button>
</$reveal>
</$list>
<<toc-caption>>
</$link>
<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}>
<<toc-caption>>
</$link>
</div>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$macrocall $name="toc-selective-expandable" tag=<<currentTiddler>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
</$reveal>
Expand All @@ -174,15 +178,15 @@ tags: $:/tags/Macro
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
<li class=<<toc-item-class>>>
<$list filter="[all[current]tagging[]$sort$] -[subfilter<__exclude__>] +[limit[1]]" variable="ignore" emptyMessage="""<$button class="tc-btn-invisible">{{$:/core/images/blank}}</$button><span class="toc-item-muted"><<toc-caption>></span>""">
<$list filter="[all[current]tagging[]$sort$] -[subfilter<__exclude__>] +[limit[1]]" variable="ignore" emptyMessage="""<$button class="tc-btn-invisible" tabindex="-1">{{$:/core/images/blank}}</$button><span class="toc-item-muted"><<toc-caption>></span>""">
<$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" aria-label={{{ [<currentTiddler>addprefix[expand ]] }}}>
<$transclude tiddler=<<toc-closed-icon>> />
<<toc-caption>>
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep" aria-label={{{ [<currentTiddler>addprefix[collapse ]] }}}>
<$transclude tiddler=<<toc-open-icon>> />
<<toc-caption>>
</$button>
Expand Down
23 changes: 12 additions & 11 deletions themes/tiddlywiki/vanilla/base.tid
Original file line number Diff line number Diff line change
Expand Up @@ -3005,38 +3005,39 @@ input.tc-palette-manager-colour-input {
border-bottom: 1px solid <<colour tab-border>>;
}

.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a,
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a {
display: block;
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > .tc-toc-item-row,
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > .tc-toc-item-row {
display: flex;
align-items: center;
padding: 0.12em 1em 0.12em 0.25em;
}

.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a {
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > .tc-toc-item-row {
border-top: 1px solid <<colour tab-background>>;
border-left: 1px solid <<colour tab-background>>;
border-bottom: 1px solid <<colour tab-background>>;
}

.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a:hover {
text-decoration: none;
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > .tc-toc-item-row:hover {
border-top: 1px solid <<colour tab-border>>;
border-left: 1px solid <<colour tab-border>>;
border-bottom: 1px solid <<colour tab-border>>;
background: <<colour tab-border>>;
}

.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a {
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item a:hover,
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected a:hover {
text-decoration: none;
}

.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > .tc-toc-item-row {
border-top: 1px solid <<colour tab-border>>;
border-left: 1px solid <<colour tab-border>>;
border-bottom: 1px solid <<colour tab-border>>;
background: <<colour background>>;
margin-right: -1px;
}

.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a:hover {
text-decoration: none;
}

.tc-tabbed-table-of-contents .tc-tabbed-table-of-contents-content {
display: inline-block;
vertical-align: top;
Expand Down
Loading