feat: follow user OS theme with JS disabled (#357)

This commit is contained in:
Óscar 2024-07-24 19:14:57 +02:00 committed by GitHub
parent 5db006ac47
commit c7b79552c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 70 additions and 38 deletions

View file

@ -19,6 +19,8 @@ tabi can be customised in two ways: by setting the default theme (dark or light)
Use `default_theme = "dark"` to set the dark theme as the default, or `default_theme = "light"` to set the light theme as the default.
Setting `default_theme = ""` (or commenting out the variable) will follow the user's system preference (light or dark mode).
To permanently set your site to either the dark or light theme, you need to disable the theme switcher in `config.toml` and set your preferred theme as the `default_theme`.
For example, to have a permanent dark theme: