2014-06-12 17:01:33 +00:00
|
|
|
title: $:/core/macros/tabs
|
|
|
|
tags: $:/tags/Macro
|
2014-04-09 19:12:10 +00:00
|
|
|
|
2014-07-02 11:15:52 +00:00
|
|
|
\define tabs(tabsList,default,state:"$:/state/tab",class,template)
|
2014-05-11 17:47:14 +00:00
|
|
|
<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$">
|
|
|
|
|
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
|