aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/static/js/base (follow)
Commit message (Collapse)AuthorAgeLines
* Dark: Fix switch toggle when system preference is usedGravatar hedy2024-01-20-2/+4
| | | | Thanks to wookie for finding the bug.
* Optimistic fix for FOUC on initial site loadGravatar hedy2024-01-18-0/+4
|
* Temporary fix to theme-switching FOUC problemGravatar hedy2024-01-18-6/+3
|
* Dark: Possibly fix FOUC during theme switchGravatar hedy2024-01-18-4/+4
|
* Dark: Set correct theme immediately when the script loadsGravatar hedy2024-01-18-10/+10
| | | | | | | | | | 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]>
* Dark: Improve order of switching stylesheetsGravatar hedy2024-01-18-1/+1
|
* Dark: Name JS & CSS files according to their contentGravatar hedy2024-01-05-0/+0
| | | | | | | | 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`.
* Dark: Fix hero colors on homepageGravatar hedy2024-01-05-0/+2
| | | | | | | | | | 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.
* Dark: Support system color scheme preferenceGravatar hedy2024-01-05-12/+37
| | | | | | | | | | | | | 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.
* Dark: Refactor toggle handling JSGravatar hedy2024-01-05-72/+42
| | | | | | | | | | | | | | - 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!
* Automatically fix lintGravatar hedy2023-12-14-1/+1
|
* Determine current theme and set switchGravatar GDWR2022-02-08-24/+28
|
* getCurrentTheme returns "default" if emptyGravatar GDWR2022-02-08-0/+3
|
* Add initial dark themeGravatar GDWR2022-02-08-0/+87
|
* Remove files related to django-allauth.Gravatar Leon Sandøy2020-10-04-100/+0
|
* Add user settings modal, with connections management and account deletionGravatar Gareth Coles2019-10-23-0/+100