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/head.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layout/_partial/head.ejs') diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index e56722d..54ec4c0 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -33,6 +33,6 @@ <%- css('css/style.min.css') %> - - + + -- cgit v1.2.3