mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-19 00:04:51 +00:00
9ab0c84140
The new importvariables widget imports macro/variable definitions from the specified tiddlers and makes them available to its children. Allows us to split PageMacros up into separate tiddlers. We still support loading macros from $:/core/ui/PageMacros to help people upgrading. Fixes #644 and #559
23 lines
831 B
Plaintext
23 lines
831 B
Plaintext
title: $:/core/macros/tabs
|
|
tags: $:/tags/Macro
|
|
|
|
\define tabs(tabsList,default,state:"$:/state/tab",class)
|
|
<div class="tw-tab-set $class$">
|
|
<div class="tw-tab-buttons $class$">
|
|
<$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>
|
|
</div><div class="tw-tab-divider $class$"/><div class="tw-tab-content $class$">
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
|
|
<$transclude tiddler=<<currentTab>> mode="block"/>
|
|
</$reveal>
|
|
</$list>
|
|
</div>
|
|
</div>
|
|
\end
|