From 058b562304a96055a57f8daee80db07c596684ec Mon Sep 17 00:00:00 2001 From: hedy Date: Fri, 5 Jan 2024 09:16:47 +0800 Subject: Dark: Refactor toggle handling JS - 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! --- pydis_site/templates/base/navbar.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pydis_site/templates/base/navbar.html') diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html index f6a1bc26..57fdbf6a 100644 --- a/pydis_site/templates/base/navbar.html +++ b/pydis_site/templates/base/navbar.html @@ -3,7 +3,6 @@ {% block head %} - {% endblock %} @@ -104,17 +103,18 @@ + {# Theme toggle #} - {# Desktop Nav Discord #} + {# Desktop Nav Discord #}
Discord
-- cgit v1.2.3