mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-15 15:10:30 -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
17 lines
642 B
Text
17 lines
642 B
Text
title: $:/snippets/viewswitcher
|
|
|
|
\define icon()
|
|
$:/core/images/storyview-$(storyview)$
|
|
\end
|
|
\whitespace trim
|
|
\function view.filter() [<storyview>prefix{$:/view}]
|
|
|
|
<$linkcatcher to="$:/view">
|
|
<div class="tc-chooser tc-viewswitcher" role="listbox">
|
|
<$list filter="[storyviews[]]" variable="storyview">
|
|
<div class={{{ [view.filter[]then[tc-chooser-item tc-chosen]else[tc-chooser-item]] }}}>
|
|
<$button tag="a" class="tc-tiddlylink tc-btn-invisible" role="option" to=<<storyview>> aria-selected={{{ [view.filter[]then[true]else[false]] }}}><$transclude tiddler=<<icon>>/><$text text=<<storyview>>/></$button>
|
|
</div>
|
|
</$list>
|
|
</div>
|
|
</$linkcatcher>
|