1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-10 01:10:28 +00:00
TiddlyWiki5/core/wiki/paletteswitcher.tid
2024-12-27 12:00:50 +00:00

27 lines
932 B
Plaintext

title: $:/snippets/paletteswitcher
\whitespace trim
\procedure actions()
<$transclude $variable="actions-switch-colour-palette" paletteTitle=<<navigateTo>>/>
\end actions
<$linkcatcher actions=<<actions>>>
<div class="tc-chooser tc-chooser-cards">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Palette]sort[name]]">
<div class={{{ [<currentTiddler>match{$:/palette}then[tc-chosen]] tc-chooser-item +[join[ ]] }}}>
<$link to={{!!title}} aria-label=`${[[$:/language/ControlPanel/Palette/Caption]get[text]]}$ - ${[all[current]get[name]]}$. ${[all[current]get[description]]}$`>
{{||$:/snippets/currpalettepreview}}
<div class="tc-chooser-item-description">
''<$view field="name" format="text"/>''
<div class="tc-chooser-item-subtitle">
<$view field="description" format="text"/>
</div>
</div>
</$link>
</div>
</$list>
</div>
</$linkcatcher>
{{$:/snippets/palettetests}}