mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-17 15:24:50 +00:00
0671e59fed
Reasons: - can show or hide the button text with CSS (assuming tv-config-toolbar-text is yes). - can have different looking buttons in the page controls versus the view toolbar, etc - more flexibility styling the button appearance, for example you can change the text size compared to the icon size - button appearance is more themeable
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
title: $:/core/ui/Buttons/theme
|
|
tags: $:/tags/PageControls
|
|
caption: {{$:/core/images/theme-button}} {{$:/language/Buttons/Theme/Caption}}
|
|
description: {{$:/language/Buttons/Theme/Hint}}
|
|
|
|
<$button popup=<<qualify "$:/state/popup/theme">> tooltip={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
|
|
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
|
{{$:/core/images/theme-button}}
|
|
</$list>
|
|
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Theme/Caption}}/></span>
|
|
</$list>
|
|
</$button>
|
|
<$reveal state=<<qualify "$:/state/popup/theme">> type="popup" position="below" animate="yes">
|
|
<div class="tc-drop-down">
|
|
<$linkcatcher to="$:/theme">
|
|
<$list filter="[plugin-type[theme]sort[title]]" variable="themeTitle">
|
|
<$link to=<<themeTitle>>>
|
|
<span class="tc-drop-down-bullet">
|
|
<$reveal type="match" state="$:/theme" text=<<themeTitle>>>
|
|
•
|
|
</$reveal>
|
|
<$reveal type="nomatch" state="$:/theme" text=<<themeTitle>>>
|
|
|
|
</$reveal>
|
|
</span>
|
|
<$view tiddler=<<themeTitle>> field="name"/>
|
|
</$link>
|
|
</$list>
|
|
</$linkcatcher>
|
|
</div>
|
|
</$reveal>
|