kopia lustrzana https://github.com/miklobit/TiddlyWiki5
31 wiersze
834 B
Plaintext
31 wiersze
834 B
Plaintext
title: $:/snippets/languageswitcher
|
|
|
|
\define flag-title()
|
|
$(languagePluginTitle)$/icon
|
|
\end
|
|
|
|
<$linkcatcher to="$:/language">
|
|
<div class="tc-chooser tc-language-chooser">
|
|
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[description]]">
|
|
<$set name="cls" filter="[all[current]field:title{$:/language}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>>
|
|
<$link>
|
|
<span class="tc-image-button">
|
|
<$set name="languagePluginTitle" value=<<currentTiddler>>>
|
|
<$transclude subtiddler=<<flag-title>>>
|
|
<$list filter="[all[current]field:title[$:/languages/en-GB]]">
|
|
<$transclude tiddler="$:/languages/en-GB/icon"/>
|
|
</$list>
|
|
</$transclude>
|
|
</$set>
|
|
</span>
|
|
<$view field="description">
|
|
<$view field="name">
|
|
<$view field="title"/>
|
|
</$view>
|
|
</$view>
|
|
</$link>
|
|
</div>
|
|
</$set>
|
|
</$list>
|
|
</div>
|
|
</$linkcatcher> |