Skip to content

Commit

Permalink
Create $__Modern.TiddlyDev_Startup.tid
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed May 9, 2024
1 parent 06a1983 commit aa24489
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions wiki/tiddlers/$__Modern.TiddlyDev_Startup.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tags: $:/tags/StartupAction/Browser
title: $:/Modern.TiddlyDev/Startup
type: text/vnd.tiddlywiki

<!-- Switch language -->
<$action-setfield $tiddler="$:/language" text={{{ [{$:/info/browser/language}search:title[zh]then[zh-Hans]else[en-GB]addprefix[$:/languages/]] }}}/>

<!-- fold sidebar for narrow screen -->
<$reveal type="lt" state="$:/info/browser/screen/width" text={{{ [{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}removesuffix[px]] }}}><$action-setfield $tiddler="$:/state/sidebar" $value="no"/></$reveal>
<$reveal type="gteq" state="$:/info/browser/screen/width" text={{{ [{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}removesuffix[px]] }}}><$action-setfield $tiddler="$:/state/sidebar" $value="yes"/></$reveal>

<!-- switch theme -->
<$action-setfield $tiddler="$:/palette" $value={{{ [{$:/info/darkmode}match[yes]then[$:/palettes/Nord]else[$:/palettes/Notion]] }}}/>

0 comments on commit aa24489

Please sign in to comment.