2014-06-12 17:01:33 +00:00
|
|
|
title: $:/core/macros/tabs
|
|
|
|
tags: $:/tags/Macro
|
2014-04-09 19:12:10 +00:00
|
|
|
|
2018-04-08 08:47:57 +00:00
|
|
|
\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}}>
|
2016-01-07 12:40:10 +00:00
|
|
|
<$tiddler tiddler=<<save-currentTiddler>>>
|
2015-05-05 20:48:48 +00:00
|
|
|
<$set name="tv-wikilinks" value="no">
|
2017-11-13 13:56:13 +00:00
|
|
|
<$transclude tiddler="$buttonTemplate$" mode="inline">
|
2014-06-21 10:16:35 +00:00
|
|
|
<$transclude tiddler=<<currentTab>> field="caption">
|
|
|
|
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
|
|
|
|
</$transclude>
|
2017-11-13 13:56:13 +00:00
|
|
|
</$transclude>
|
2016-01-07 12:40:10 +00:00
|
|
|
</$set></$tiddler></$button></$tiddler></$set></$list>
|
|
|
|
</div>
|
|
|
|
<div class="tc-tab-divider $class$"/>
|
|
|
|
<div class="tc-tab-content $class$">
|
2014-06-21 10:16:35 +00:00
|
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
|
|
|
2018-04-08 08:47:57 +00:00
|
|
|
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$" retain="""$retain$""">
|
2014-06-21 10:16:35 +00:00
|
|
|
|
2014-07-02 11:15:52 +00:00
|
|
|
<$transclude tiddler="$template$" mode="block">
|
|
|
|
|
2014-07-12 08:07:51 +00:00
|
|
|
<$transclude tiddler=<<currentTab>> mode="block"/>
|
2014-07-02 11:15:52 +00:00
|
|
|
|
|
|
|
</$transclude>
|
|
|
|
|
2014-06-21 10:16:35 +00:00
|
|
|
</$reveal>
|
|
|
|
|
|
|
|
</$list>
|
2013-11-04 18:21:20 +00:00
|
|
|
</div>
|
2014-05-11 17:47:14 +00:00
|
|
|
</div>
|
2013-12-05 16:21:10 +00:00
|
|
|
\end
|