2014-06-12 17:01:33 +00:00
|
|
|
title: $:/core/macros/tabs
|
|
|
|
tags: $:/tags/Macro
|
2014-04-09 19:12:10 +00:00
|
|
|
|
2014-05-11 17:47:14 +00:00
|
|
|
\define tabs(tabsList,default,state:"$:/state/tab",class)
|
|
|
|
<div class="tw-tab-set $class$">
|
|
|
|
<div class="tw-tab-buttons $class$">
|
2014-06-21 10:16:35 +00:00
|
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
|
|
<$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tw-tab-selected">
|
|
|
|
<$transclude tiddler=<<currentTab>> field="caption">
|
|
|
|
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
|
|
|
|
</$transclude>
|
|
|
|
</$button>
|
|
|
|
</$list>
|
2014-05-11 17:47:14 +00:00
|
|
|
</div><div class="tw-tab-divider $class$"/><div class="tw-tab-content $class$">
|
2014-06-21 10:16:35 +00:00
|
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
|
|
|
|
|
|
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
|
|
|
|
|
|
|
|
<$transclude tiddler=<<currentTab>> mode="block"/>
|
|
|
|
|
|
|
|
</$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
|