mirror of https://gitlab.com/octtspacc/OcttKB
28 lines
968 B
Plaintext
28 lines
968 B
Plaintext
tags: $:/tags/Commander/Macro
|
|
title: $:/plugins/kookma/commander/macros/slider
|
|
type: text/vnd.tiddlywiki
|
|
|
|
\define commander-slider(title, default:"closed")
|
|
<$set name="revealState" value=<<qualify "$:/state/commander/reveal/$title$">>>
|
|
<h2>
|
|
<$reveal type="nomatch" state=<<revealState>> text="open" default="$default$">
|
|
<$button class="tc-btn-invisible tc-tiddlylink" set=<<revealState>> setTo="open">
|
|
{{$:/core/images/right-arrow}}
|
|
</$button>
|
|
</$reveal>
|
|
<$reveal type="match" state=<<revealState>> text="open" default="$default$">
|
|
<$button class="tc-btn-invisible tc-tiddlylink" set=<<revealState>> setTo="closed">
|
|
{{$:/core/images/down-arrow}}
|
|
</$button>
|
|
</$reveal>
|
|
<$view tiddler="$title$" field="caption">
|
|
<$view tiddler="$title$" field="title"></$view>
|
|
</$view>
|
|
|
|
</h2>
|
|
|
|
<$reveal type="match" state=<<revealState>> text="open" default="$default$">
|
|
<$transclude tiddler="$title$" mode="block" />
|
|
</$reveal>
|
|
</$set>
|
|
\end |