diff options
-rw-r--r-- | pydis_site/static/js/base/themes.js | 4 | ||||
-rw-r--r-- | pydis_site/templates/base/base.html | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/pydis_site/static/js/base/themes.js b/pydis_site/static/js/base/themes.js index fa7b9cf6..f79b759d 100644 --- a/pydis_site/static/js/base/themes.js +++ b/pydis_site/static/js/base/themes.js @@ -3,6 +3,10 @@ const defaultTheme = "light"; const stylesheet = document.getElementById("bulma-css"); +// We include the dark stylesheet in base template to include the rel="preload", +// but remove the actual rel="stylesheet" element here because we won't need it. +document.getElementById("bulma-css-dark").remove(); + // Get saved preference for the site in local storage, optionally accounting // for system preference used when a page loads. function getCurrentTheme(systemPrefers) { diff --git a/pydis_site/templates/base/base.html b/pydis_site/templates/base/base.html index bf58fb05..e497298a 100644 --- a/pydis_site/templates/base/base.html +++ b/pydis_site/templates/base/base.html @@ -24,6 +24,7 @@ <title>Python Discord | {% block title %}Website{% endblock %}</title> {% bulma %} + {% bulma 'dark' include_js=False %} {% font_awesome %} <link rel="stylesheet" href="{% static "css/base/base.css" %}"> |