1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 20:10:03 +00:00
TiddlyWiki5/core/wiki/macros/tabs.tid

35 lines
1.2 KiB
Plaintext
Raw Normal View History

title: $:/core/macros/tabs
tags: $:/tags/Macro
\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain)
2014-08-28 18:41:29 +00:00
<div class="tc-tab-set $class$">
<div class="tc-tab-buttons $class$">
2019-08-02 14:05:12 +00:00
<$list filter="$tabsList$" variable="currentTab" storyview="pop"><$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="$buttonTemplate$" mode="inline">
<$transclude tiddler=<<currentTab>> field="caption">
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
</$transclude>
</$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$" retain="""$retain$""">
<$transclude tiddler="$template$" mode="block">
<$transclude tiddler=<<currentTab>> mode="block"/>
</$transclude>
</$reveal>
</$list>
</div>
</div>
\end