2014-06-12 17:01:33 +00:00
|
|
|
title: $:/core/macros/tabs
|
|
|
|
tags: $:/tags/Macro
|
2014-04-09 19:12:10 +00:00
|
|
|
|
2017-11-13 13:56:13 +00:00
|
|
|
\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate)
|
2014-08-28 18:41:29 +00:00
|
|
|
<div class="tc-tab-set $class$">
|
|
|
|
<div class="tc-tab-buttons $class$">
|
2016-10-26 20:41:41 +00:00
|
|
|
<$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}}>
|
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">
|
|
|
|
|
2016-10-26 20:41:41 +00:00
|
|
|
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
|
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
|