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

✨ feat: allow setting default theme #103

Merged
merged 4 commits into from
Aug 7, 2023
Merged

✨ feat: allow setting default theme #103

merged 4 commits into from
Aug 7, 2023

Conversation

welpo
Copy link
Owner

@welpo welpo commented Aug 7, 2023

This PR introduces a new feature to set a default theme, either as a fallback for users with JavaScript disabled, or for all visitors when the theme switcher is disabled (theme_switcher = false).

Features:

  • Clearer configuration comments: Reworded comments in the configuration to improve clarity and understanding regarding the theme settings.
  • Introduction of default_theme: Added a new configuration variable, default_theme, that allows users to set a default theme ("light" or "dark").

Technical details:

  • The theme_switcher configuration remains, allowing dynamic theme switching manually and based on the user's OS-level theme settings.
  • When theme_switcher is disabled, the site will strictly use the theme set in the default_theme variable.
  • If a user has JavaScript disabled and theme_switcher is enabled, the site will display in the theme defined in default_theme.

Additionally, block quotes have been redesigned, and the CSS variables have been simplified.

Used as fallback when JS is disabled and `theme_switcher` is enabled.

If `default_theme` is unset, it defaults to "light".

Used as single theme when `theme_switcher` is disabled.
@welpo welpo added the enhancement New feature or request label Aug 7, 2023
@welpo welpo merged commit 42293b2 into main Aug 7, 2023
1 check passed
@welpo welpo deleted the feat/default-theme branch August 7, 2023 22:56
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

Successfully merging this pull request may close these issues.

1 participant