1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-17 23:34:50 +00:00
TiddlyWiki5/core/wiki/languageswitcher.tid
Cameron Fischer 6701683ddf
Trim saga: The big macros (#6269)
* adding trim: large macros and languageswitcher

* adding trim: KeyboardShortcuts.tid

* Hidden space to force some macros to be inline

This'll be our little secret. This single byte will actually allow
the uglifier to trim over thirty bytes while condensing.

I know I'm not supposed to optimize TW for some 3rd party plugin,
but I'm the one doing the whitespace trim work, so I'll give myself
this.

* More consistent nested quoting
2022-04-01 12:09:59 +01:00

33 lines
857 B
Plaintext

title: $:/snippets/languageswitcher
\define flag-title()
$(languagePluginTitle)$/icon
\end
\whitespace trim
<$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>
&#32;
<$view field="description">
<$view field="name">
<$view field="title"/>
</$view>
</$view>
</$link>
</div>
</$set>
</$list>
</div>
</$linkcatcher>