Browse Source

Solarized theme: add "solarized-" prefix

Since the site originally launched with only the Solarized themes,
they've always just been referred to internally as "light" and "dark".
This changes them to solarized-light and solarized-dark respectively.
merge-requests/85/head
Lugubris 5 years ago
committed by Deimos
parent
commit
6438e34579
  1. 4
      tildes/scss/themes/_solarized.scss
  2. 6
      tildes/tildes/templates/base.jinja2
  3. 4
      tildes/tildes/views/settings.py

4
tildes/scss/themes/_solarized.scss

@ -64,7 +64,7 @@ $solarized-dark: (
"foreground-secondary": $fg-darkest, "foreground-secondary": $fg-darkest,
); );
body.theme-dark {
body.theme-solarized-dark {
@include use-theme(map-merge($solarized-base, $solarized-dark)); @include use-theme(map-merge($solarized-base, $solarized-dark));
} }
@ -81,6 +81,6 @@ $solarized-light: (
"warning": $orange, "warning": $orange,
); );
body.theme-light {
body.theme-solarized-light {
@include use-theme(map-merge($solarized-base, $solarized-light)); @include use-theme(map-merge($solarized-base, $solarized-light));
} }

6
tildes/tildes/templates/base.jinja2

@ -20,7 +20,7 @@
{% endblock %} {% endblock %}
{# Hardcoding each option isn't great, but I don't know a better method #} {# Hardcoding each option isn't great, but I don't know a better method #}
{% if request.cookies.get('theme', '') == 'dark' %}
{% if request.cookies.get('theme', '') == 'solarized-dark' %}
<meta name="theme-color" content="#073642"> <meta name="theme-color" content="#073642">
{% elif request.cookies.get("theme", "") == "dracula" %} {% elif request.cookies.get("theme", "") == "dracula" %}
<meta name="theme-color" content="#282a36"> <meta name="theme-color" content="#282a36">
@ -115,8 +115,8 @@
<select class="form-select" name="theme" id="theme" data-js-theme-selector> <select class="form-select" name="theme" id="theme" data-js-theme-selector>
{% for (theme, description) in ( {% for (theme, description) in (
("white", "White"), ("white", "White"),
("light", "Solarized Light"),
("dark", "Solarized Dark"),
("solarized-light", "Solarized Light"),
("solarized-dark", "Solarized Dark"),
("dracula", "Dracula"), ("dracula", "Dracula"),
("atom-one-dark", "Atom One Dark"), ("atom-one-dark", "Atom One Dark"),
("black", "Black"), ("black", "Black"),

4
tildes/tildes/views/settings.py

@ -34,8 +34,8 @@ def get_settings(request: Request) -> dict:
theme_options = { theme_options = {
"white": "White", "white": "White",
"light": "Solarized Light",
"dark": "Solarized Dark",
"solarized-light": "Solarized Light",
"solarized-dark": "Solarized Dark",
"dracula": "Dracula", "dracula": "Dracula",
"atom-one-dark": "Atom One Dark", "atom-one-dark": "Atom One Dark",
"black": "Black", "black": "Black",

Loading…
Cancel
Save