OcttKB/Wiki-OcttKB/plugins/commander/$__plugins_kookma_commander...

28 lines
968 B
Plaintext
Raw Permalink Normal View History

2023-06-11 22:14:59 +02:00
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