mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-09 17:00:27 +00:00
pick a theme if none is set
This commit is contained in:
parent
fcbdf11583
commit
5727dddcd3
@ -53,5 +53,5 @@ tags: $:/tags/Global
|
||||
|
||||
\function get.base.functions.theme(theme) [<theme>addsufix[/functions]!is[missing]] :else[<theme>addsuffix[/functions]is[shadow]] :else[function[get.base.functions.theme.recursive],<theme>]
|
||||
|
||||
\function get.current.theme() [{$:/theme}!is[blank]] :else[all[tiddlers+shadows]plugin-type[theme]first[]]
|
||||
\function get.current.theme() [{$:/theme}!is[blank]] :else[all[tiddlers+shadows]plugin-type[theme]plugin-priority[0]first[]]
|
||||
|
||||
|
@ -4,7 +4,7 @@ title: $:/snippets/themeswitcher
|
||||
<$linkcatcher to="$:/theme">
|
||||
<div class="tc-chooser">
|
||||
<$list filter="[plugin-type[theme]sort[title]]">
|
||||
<$set name="cls" filter="[all[current]field:title{$:/theme}] [[$:/theme]!has[text]addsuffix[s/tiddlywiki/vanilla]field:title<currentTiddler>] +[limit[1]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||
<$set name="cls" filter="[all[current]field:title{$:/theme}] [<get.current.theme>field:title<currentTiddler>] +[limit[1]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||
<div class=<<cls>>><$link to={{!!title}}>
|
||||
''<$view field="name" format="text"/>''
|
||||
 
|
||||
|
Loading…
Reference in New Issue
Block a user