diff options
author | 2024-01-05 20:55:34 +0800 | |
---|---|---|
committer | 2024-01-05 20:55:34 +0800 | |
commit | 7559cb72da7e8b84dd81b33d54ba6c6abd156fd7 (patch) | |
tree | 00e8f955e33c0e91f4a465782a98829a08fa9824 | |
parent | Dark: Revert some not so decent whitespace changes from previous PR (diff) |
Dark: Name JS & CSS files according to their content
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`.
-rw-r--r-- | pydis_site/static/css/base/themes.css (renamed from pydis_site/static/css/base/navbar.css) | 2 | ||||
-rw-r--r-- | pydis_site/static/js/base/themes.js (renamed from pydis_site/static/js/base/navbar.js) | 0 | ||||
-rw-r--r-- | pydis_site/templates/base/navbar.html | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/pydis_site/static/css/base/navbar.css b/pydis_site/static/css/base/themes.css index 9d71e799..35273d44 100644 --- a/pydis_site/static/css/base/navbar.css +++ b/pydis_site/static/css/base/themes.css @@ -1,3 +1,5 @@ +/* Theme switch toggle */ + .switch { position: relative; height: 2em; diff --git a/pydis_site/static/js/base/navbar.js b/pydis_site/static/js/base/themes.js index 2a57cad4..2a57cad4 100644 --- a/pydis_site/static/js/base/navbar.js +++ b/pydis_site/static/js/base/themes.js diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html index 57fdbf6a..64518146 100644 --- a/pydis_site/templates/base/navbar.html +++ b/pydis_site/templates/base/navbar.html @@ -1,9 +1,9 @@ {% load static %} {% block head %} - <link rel="stylesheet" href="{% static "css/base/navbar.css" %}"> + <link rel="stylesheet" href="{% static "css/base/themes.css" %}"> <link href="https://css.gg/css?=|moon|sun" rel="stylesheet"> - <script src="{% static "js/base/navbar.js" %}"></script> + <script src="{% static "js/base/themes.js" %}"></script> {% endblock %} <nav class="navbar is-primary" role="navigation" aria-label="main navigation"> |