1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +00:00
TiddlyWiki5/core/wiki/macros/tabs.tid
Jermolene 8d35178bc4 Undo 664225f6fd and 56640b90bb
See the discussion at #2628
2016-10-26 21:41:41 +01:00

33 lines
1.1 KiB
Plaintext

title: $:/core/macros/tabs
tags: $:/tags/Macro
\define tabs(tabsList,default,state:"$:/state/tab",class,template)
<div class="tc-tab-set $class$">
<div class="tc-tab-buttons $class$">
<$list filter="$tabsList$" variable="currentTab"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
<$tiddler tiddler=<<save-currentTiddler>>>
<$set name="tv-wikilinks" value="no">
<$transclude tiddler=<<currentTab>> field="caption">
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
</$transclude>
</$set></$tiddler></$button></$tiddler></$set></$list>
</div>
<div class="tc-tab-divider $class$"/>
<div class="tc-tab-content $class$">
<$list filter="$tabsList$" variable="currentTab">
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
<$transclude tiddler="$template$" mode="block">
<$transclude tiddler=<<currentTab>> mode="block"/>
</$transclude>
</$reveal>
</$list>
</div>
</div>
\end