mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-05 18:20:38 -08:00
* Improve theme switcher accessibility * Improve view switcher accessibility * Replace set widgets with filters * Improve languageswitcher & layoutswitcher accessibility * Add indentation inside list widget * Switch to functions
18 lines
No EOL
661 B
Text
18 lines
No EOL
661 B
Text
title: $:/snippets/themeswitcher
|
|
|
|
\whitespace trim
|
|
\function theme.filter() [all[current]field:title{$:/theme}] [[$:/theme]!has[text]addsuffix[s/tiddlywiki/vanilla]field:title<currentTiddler>] +[limit[1]]
|
|
|
|
<$linkcatcher to="$:/theme">
|
|
<div class="tc-chooser" role="listbox">
|
|
<$list filter="[plugin-type[theme]sort[title]]">
|
|
<div class={{{ [theme.filter[]then[tc-chooser-item tc-chosen]else[tc-chooser-item]] }}}>
|
|
<$link to={{!!title}} role="option" aria-selected={{{ [theme.filter[]then[true]else[false]] }}}>
|
|
''<$view field="name" format="text"/>''
|
|
 
|
|
<$view field="description" format="text"/>
|
|
</$link>
|
|
</div>
|
|
</$list>
|
|
</div>
|
|
</$linkcatcher> |