Open joeroe opened 2 months ago
I looked into how hard it would be to do myself and stumbled upon this: https://yonkov.github.io/post/add-dark-mode-toggle-to-hugo/
I haven't looked too closely on it. But it would be fantastic to be able to just set dark and light palette, and then get a switch for it.
On my site, I ended up implementing it as in https://github.com/joeroe/risotto/issues/50#issuecomment-2212448137 but even simpler, still using the media query (without any button):
This uses an additional paletteLight
variable in [params.theme] for configuration.
On a related note, how hard would it be to implement a theme-switching button for this template (aka light/dark mode)?
Originally posted by @BachoSeven in https://github.com/joeroe/risotto/issues/50#issuecomment-2212432484