1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-09 08:50:26 +00:00

pick a theme if none is set

This commit is contained in:
BurningTreeC 2024-10-27 08:25:39 +01:00
parent fcbdf11583
commit 5727dddcd3
2 changed files with 2 additions and 2 deletions

View File

@ -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[]]

View File

@ -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"/>''
&#32;