| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
Thanks to wookie for finding the bug.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This fixes the latency previously observed on page loads.
We still have to put switch toggling after page loads though.
Genius idea by wookie.
Co-authored-by: wookie184 <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
We have the CSS for the navbar in base.css, the relevant files only
contain code for the theme toggle, so they should be named as such.
If we ever implement CSS variables per-theme, they could then be done in
`themes.css`.
|
|
|
|
|
|
|
|
|
|
| |
We can now use `[data-theme="dark"]` selector in CSS to defined styles
specifically for dark mode. This follows common web dev patterns and
gives little overhead.
- Hero
- Added `wave_black` SVG which copies `wave_white` as is but uses the
site's dark mode background color.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added features
- When no preference already stored when page loads, we'll take into
account the system setting and set the theme automatically.
- When the system setting is modified while the site is active, switch
theme automatically.
- The system preference takes lower precedence than saved preference
from the switch toggle, unless the setting is modified while the site
is active.
Miscellaneous refactor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use localstorage. Advantages:
- One key=value for the entire site, without needing to specify
`path=/`
- No need for string splitting to parse the `key=value; ...` data
- Suggested more widely in tutorials
Pretty good support: https://caniuse.com/?search=localstorage
- Remove the need for JQuery, use IDs for switch and knob elements.
- This also makes the code more robust if the page has other switch &
knob classes!
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|