mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
84479bc403
* Update search.tid * Update DefaultSearchResultList.tid * Update tabs.tid * Update SearchResults.tid * Update tabs.tid * Update SearchResults.tid * Update search.tid * Update keyboard-driven-input.tid * Update shortcuts.multids * Update ShortcutInfo.multids * Update Misc.multids * Update keyboard-driven-input.tid * Update search.tid * Update Misc.multids
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
title: $:/core/macros/tabs
|
|
tags: $:/tags/Macro
|
|
|
|
\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain,actions,explicitState)
|
|
<$set name="qualifiedState" value=<<qualify "$state$">>>
|
|
<$set name="tabsState" filter="[<__explicitState__>minlength[1]] ~[<qualifiedState>]">
|
|
<div class="tc-tab-set $class$">
|
|
<div class="tc-tab-buttons $class$">
|
|
<$list filter="$tabsList$" variable="currentTab" storyview="pop"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<tabsState>> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
|
|
<$tiddler tiddler=<<save-currentTiddler>>>
|
|
<$set name="tv-wikilinks" value="no">
|
|
<$transclude tiddler="$buttonTemplate$" mode="inline">
|
|
<$transclude tiddler=<<currentTab>> field="caption">
|
|
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
|
|
</$transclude>
|
|
</$transclude>
|
|
</$set></$tiddler>$actions$</$button></$tiddler></$set></$list>
|
|
</div>
|
|
<div class="tc-tab-divider $class$"/>
|
|
<div class="tc-tab-content $class$">
|
|
<$list filter="$tabsList$" variable="currentTab">
|
|
|
|
<$reveal type="match" state=<<tabsState>> text=<<currentTab>> default="$default$" retain="""$retain$""">
|
|
|
|
<$transclude tiddler="$template$" mode="block">
|
|
|
|
<$transclude tiddler=<<currentTab>> mode="block"/>
|
|
|
|
</$transclude>
|
|
|
|
</$reveal>
|
|
|
|
</$list>
|
|
</div>
|
|
</div>
|
|
</$set>
|
|
</$set>
|
|
\end
|