diff options
author | Rise <8315221+AmazingRise@users.noreply.github.com> | 2020-04-11 12:59:03 +0300 |
---|---|---|
committer | Rise <8315221+AmazingRise@users.noreply.github.com> | 2020-04-11 12:59:03 +0300 |
commit | 5aab2b5254c7a38dbba90fc498ed58d028854614 (patch) | |
tree | f11cde6c89c524495e70c8f322df8ac89b21815e | |
parent | d7be00031d81bb28030dfe8ef821977c206dadf4 (diff) |
Updated Dark Mode (markdown)
-rw-r--r-- | Dark-Mode.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Dark-Mode.md b/Dark-Mode.md index 37a93f0..da1fe35 100644 --- a/Dark-Mode.md +++ b/Dark-Mode.md @@ -6,4 +6,18 @@ If you don't like this feature, you can disable it. Add `disableDarkMode=true` to the section of `[param]` in your `config.toml`. Then you will not see it. +## Automatically enable Dark Mode + +Open `/static/js/journey.js`, and you will find this snippet. +(Currently at Line 78) + +```javascript + if (night==""){ + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + //this.toggleDarkMode(); + } +``` + +And remove `//` from `this.toggleDarkMode();`, then your site will enter dark mode automatically, following browser's preference. + Feel free to raise an issue if you have some questions. :)
\ No newline at end of file |