mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-01 15:46:18 +00:00
6701683ddf
* 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
33 lines
857 B
Plaintext
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>
|
|
 
|
|
<$view field="description">
|
|
<$view field="name">
|
|
<$view field="title"/>
|
|
</$view>
|
|
</$view>
|
|
</$link>
|
|
</div>
|
|
</$set>
|
|
</$list>
|
|
</div>
|
|
</$linkcatcher> |