hugo-toha / toha

A Hugo theme for personal portfolio
https://hugo-toha.github.io
MIT License
1.05k stars 606 forks source link

Default color-schema seems to be "system", not "light" #934

Closed tht closed 2 months ago

tht commented 7 months ago

Expected Behavior

When disabling "dark"-mode I expect the site to be in "light".

Current Behavior

Disabling "dark"-mode (features.darkMode.enable = false) seems to switch to "system", instead of light. Disabling dark-Mode only seems to be hiding the icon to switch the color scheme.

So there seems no way to fix the site to dark or light. The switch only disables the icon to toggle it manually.

Possible Solution

IMO the default should be "light", not "system". When "dark"-mode is disabled the theme should always be "light" and not switch depending on the browser settings. This is just my two cents, maybe your view on this is different.

Steps to Reproduce

  1. Follow quick-start tutorial on https://toha-guides.netlify.app/posts/quickstart/
  2. Change config.yaml features.darkMode.enabled to false
  3. Start serving site with hugo server -w
  4. Check in a browser where dark-mode is default

Screenshots

Browsers Affected

Tested on these browsers, all of them show the same behavior.

Detailed Description

hossainemruz commented 7 months ago

When "dark"-mode is disabled the theme should always be "light" and not switch depending on the browser settings.

Yes. I agree on that. When dark mode is disabled, it should set theme to light. If dark mode is enabled, then the default should be System. I will look into it.

hossainemruz commented 2 months ago

Should be solved by #960 . Please, update to latest commit.

tht commented 2 months ago

Thanks! Works perfectly fine for me.