mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-14 05:44:50 +00:00
33 lines
1020 B
Plaintext
33 lines
1020 B
Plaintext
title: $:/snippets/paletteswitcher
|
|
|
|
\parameters (palette:"$:/palette" config:"" postFilter:"")
|
|
\whitespace trim
|
|
|
|
\procedure catchActions()
|
|
<$action-setfield $tiddler=<<palette>> $field=text text=<<navigateTo>>/>
|
|
<$list filter="[<config>!is[blank]]">
|
|
<$action-setfield $tiddler=<<config>> text=<<navigateTo>>/>
|
|
</$filter>
|
|
\end
|
|
|
|
<$linkcatcher actions=<<catchActions>>>
|
|
<div class="tc-chooser">
|
|
<$let pre={{{ [<palette>get[text]] }}} >
|
|
<$list filter=`[all[shadows+tiddlers]tag[$:/tags/Palette]sort[name]] $(postFilter)$`>
|
|
<$set name="class" filter="[all[current]prefix<pre>]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
|
<div class=<<class>> >
|
|
<$link to={{!!title}}>
|
|
''<$view field="name" format="text"/>''
|
|
 - 
|
|
<$view field="color-scheme" format="text"/>
|
|
 - 
|
|
<$view field="description" format="text"/>
|
|
{{||$:/snippets/currpalettepreview}}
|
|
</$link>
|
|
</div>
|
|
</$set>
|
|
</$list>
|
|
</$let>
|
|
</div>
|
|
</$linkcatcher>
|