From eb971acfb9130fe1f6cf4747adfc7f50b8751005 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Sun, 24 Nov 2024 19:20:46 +0800 Subject: [PATCH] Create __dynamic_light-dark_detection.tid --- tiddlers/__dynamic_light-dark_detection.tid | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tiddlers/__dynamic_light-dark_detection.tid diff --git a/tiddlers/__dynamic_light-dark_detection.tid b/tiddlers/__dynamic_light-dark_detection.tid new file mode 100644 index 0000000..f625ed0 --- /dev/null +++ b/tiddlers/__dynamic_light-dark_detection.tid @@ -0,0 +1,10 @@ +caption: Dynamically detect browser or OS setting +code-body: yes +tags: $:/tags/DarkLightChangeActions +title: _/dynamic/light-dark/detection + +<$reveal type="match" stateTitle="$:/config/palette/enable-light-dark-detection" text="yes"> + <$let default={{{ [match[yes]then[$:/config/palette/default-dark]else[$:/config/palette/default-light]] }}}> + <$action-setfield $tiddler="$:/palette" text={{{ [get[text]] }}}/> + + \ No newline at end of file