hugo-toha / toha

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

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

Open tht opened 2 months ago

tht commented 2 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 2 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.