From 5727dddcd314e2e7016e390c4b525671949f728b Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 27 Oct 2024 08:25:39 +0100 Subject: [PATCH] pick a theme if none is set --- core/wiki/functions/themes.tid | 2 +- core/wiki/themeswitcher.tid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/wiki/functions/themes.tid b/core/wiki/functions/themes.tid index d9f1c0def..152ab9b03 100644 --- a/core/wiki/functions/themes.tid +++ b/core/wiki/functions/themes.tid @@ -53,5 +53,5 @@ tags: $:/tags/Global \function get.base.functions.theme(theme) [addsufix[/functions]!is[missing]] :else[addsuffix[/functions]is[shadow]] :else[function[get.base.functions.theme.recursive],] -\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[]] diff --git a/core/wiki/themeswitcher.tid b/core/wiki/themeswitcher.tid index 6259af063..734df8efd 100644 --- a/core/wiki/themeswitcher.tid +++ b/core/wiki/themeswitcher.tid @@ -4,7 +4,7 @@ title: $:/snippets/themeswitcher <$linkcatcher to="$:/theme">
<$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] +[limit[1]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"> +<$set name="cls" filter="[all[current]field:title{$:/theme}] [field:title] +[limit[1]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
>><$link to={{!!title}}> ''<$view field="name" format="text"/>''