Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Switch theme depending on browser configuration without JS #92

Closed
3 tasks done
Ppjet6 opened this issue Feb 5, 2023 · 1 comment
Closed
3 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@Ppjet6
Copy link

Ppjet6 commented Feb 5, 2023

I have checked all the prerequisites below and I don't see this is available

  • Read the README.md
  • Have the extended version of Hugo installed
  • Used the exampleSite's config.toml as a reference

Describe the feature

My website has the light theme enabled by default but I use the dark theme. When disabling JS for unrelated testing, I realized I don't have access to the dark theme anymore.

My browser is configured to prefer dark themes and I know this preference is used in other websites.
This would allow degrading (no JS) to still permit theme switching.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox nightly 111.0a1
@Ppjet6 Ppjet6 added the enhancement New feature or request label Feb 5, 2023
@onweru onweru self-assigned this Feb 5, 2023
onweru added a commit that referenced this issue Feb 23, 2023
Signed-off-by: weru <fromweru@gmail.com>
@onweru
Copy link
Owner

onweru commented Feb 23, 2023

@Ppjet6,

I have explored this one. While I have applied simple fix for this, it will not help beyond the theme switching.

If javascript is disabled at the browser level, at least these other functions won't work 👇🏼

  1. Mobile menu
  2. Docs sidebar
  3. Color mode switching
  4. Search
  5. Buttons' spacing.

Of these, only #1 & #5 I could see myself considering supporting where javascript is disabled in future.

@onweru onweru closed this as completed Feb 23, 2023
hupfdule pushed a commit to poiu-de/compose that referenced this issue May 27, 2023
Signed-off-by: weru <fromweru@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants