forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added "follow system" option to theme toggle (alshedivat#2261)
The theme toggle button now has a third option, which follows the user's system preferences. - In the code there's now a distinction between the theme setting (which can be "dark", "light" or "system") and the computed theme. - The theme setting is now stored as the "theme-setting" local storage variable. Since this is different from the old variable ("theme"), this will effectively reset all current user themes to the default "system". Maybe this is not what you want. - The "system" theme icon is currently a half circle symbol. - The toggle button now displays the current theme setting, rather than the next theme setting (as far as I know this is consistent with other sites which have three theme options). - `theme.js` is now loaded regardless of `site.enable_darkmode`. This is because other scripts which were always loaded relied on being able to determine the theme. `theme.js` no longer initialises the theme itself though; this only happens when `site.enable_darkmode`. - When the theme setting is "system", the theme will change immediately whenever the user changes their system theme. alshedivat#2261 --------- Signed-off-by: George Araujo <[email protected]> Co-authored-by: George Araujo <[email protected]>
- Loading branch information
1 parent
6cf110a
commit c788a30
Showing
25 changed files
with
42,162 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.