1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-16 23:04:50 +00:00
TiddlyWiki5/core/ui/PageControls/language.tid
Jermolene 120203a8e0 Refactor sidebar tools tab
It’s going to be like the tools tab of tiddler info
2014-08-02 11:58:55 +01:00

46 lines
1.5 KiB
Plaintext

title: $:/core/ui/Buttons/language
tags: $:/tags/PageControls
caption: {{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}}
description: {{$:/language/Buttons/Language/Hint}}
<$button popup=<<qualify "$:/state/popup/language">> title={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected">
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
<span class="tw-image-button">
<$image source="$:/language/Flag"/>
</span>
</$list>
<$list filter="[<tw-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Language/Caption}}/>
</$list>
</$button>
<$reveal state=<<qualify "$:/state/popup/language">> type="popup" position="below" animate="yes">
<div class="tw-drop-down">
<$linkcatcher to="$:/language">
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[title]]">
<$link>
<span class="tw-drop-down-bullet">
<$reveal type="match" state="$:/language" text=<<currentTiddler>>>
&bull;
</$reveal>
<$reveal type="nomatch" state="$:/language" text=<<currentTiddler>>>
&nbsp;
</$reveal>
</span>
<span class="tw-image-button">
<$transclude subtiddler="$:/language/Flag">
<$list filter="[all[current]field:title[$:/languages/en-GB]]">
<$transclude tiddler="$:/core" subtiddler="$:/language/Flag"/>
</$list>
</$transclude>
</span>
<$view field="description">
<$view field="name">
<$view field="title"/>
</$view>
</$view>
</$link>
</$list>
</$linkcatcher>
</div>
</$reveal>