Skip to content
Browse files

fix: day/night mode and enable reverting to the default auto day/nigh…

…t mode

- There is no easy way for a user to reset their day/night preference back to automatic (currently, they must use their web browser to clear the local storage data for the site)
- When changing the theme variation is disabled by admin (by setting `day_night` to `false` in `params.toml`), the operating system's day/night preference is still applied
- If the admin removes the option to change the theme variation, the preference for a user who already visited the site is still read from the localstorage and applied. For example, this could result in the user seeing a theme variation with poor contrast that was not intended to be shown as the site's theme was optimized for the other variation.

Fix #1385
Fix #1526
Fix #1534
  • Loading branch information
gcushen committed Feb 9, 2020
1 parent 9ef1663 commit 5e62b093311e5fb9e19fe5f9605887ceadbfc5d5
Showing with 275 additions and 137 deletions.
  1. +267 −136 assets/js/academic.js
  2. +8 −1 layouts/partials/site_js.html

0 comments on commit 5e62b09

Please sign in to comment.
You can’t perform that action at this time.