From c02c983166effdb5db4578e4ab45f58762f082d4 Mon Sep 17 00:00:00 2001 From: 135e2 <135e2@135e2.tk> Date: Sun, 29 May 2022 17:18:06 +0800 Subject: feat: add #btn-toggle-dark botton to toggle dark mode - Switch dark theme to bulmaswatch/darkly, since bulma-prefers-dark highly relies on `@media: (prefers-color-scheme: dark)` tag - Add a playerman handler to toggle shikwasa theme[1] - Use localstorage to store user's preference[2] - Fix a typo: SystemDarkmodePrefrence => SystemDarkmodePreference [1]: Modified from https://github.com/jessuni/shikwasa/blob/main/pages/public/index.js#L208 [2]: Took inspiration from https://blog.skk.moe/post/hello-darkmode-my-old-friend --- layout/_partial/scripts.ejs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'layout/_partial/scripts.ejs') diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index a242775..14348a9 100644 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -24,13 +24,14 @@