mirror of
https://gitlab.com/tildes/tildes.git
synced 2026-04-17 23:08:32 +02:00
Show theme switcher in footer for logged-in users
This commit is contained in:
@@ -109,30 +109,27 @@
|
|||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<footer id="site-footer" data-js-hide-sidebar-if-open>
|
<footer id="site-footer" data-js-hide-sidebar-if-open>
|
||||||
{# Show the theme-selection dropdown if the user isn't logged in #}
|
<div class="site-footer-theme-selection">
|
||||||
{% if not request.user %}
|
<label for="theme">Theme:</label>
|
||||||
<div class="site-footer-theme-selection">
|
<select class="form-select" name="theme" id="theme" data-js-theme-selector>
|
||||||
<label for="theme">Theme:</label>
|
{% for (theme, description) in (
|
||||||
<select class="form-select" name="theme" id="theme" data-js-theme-selector>
|
("white", "White"),
|
||||||
{% for (theme, description) in (
|
("solarized-light", "Solarized Light"),
|
||||||
("white", "White"),
|
("solarized-dark", "Solarized Dark"),
|
||||||
("solarized-light", "Solarized Light"),
|
("dracula", "Dracula"),
|
||||||
("solarized-dark", "Solarized Dark"),
|
("atom-one-dark", "Atom One Dark"),
|
||||||
("dracula", "Dracula"),
|
("black", "Black"),
|
||||||
("atom-one-dark", "Atom One Dark"),
|
("zenburn", "Zenburn"),
|
||||||
("black", "Black"),
|
("gruvbox-light", "Gruvbox Light"),
|
||||||
("zenburn", "Zenburn"),
|
("gruvbox-dark", "Gruvbox Dark")) %}
|
||||||
("gruvbox-light", "Gruvbox Light"),
|
<option value="{{ theme }}"
|
||||||
("gruvbox-dark", "Gruvbox Dark")) %}
|
{{ 'selected' if theme == request.cookies.get("theme", "white") else '' }}
|
||||||
<option value="{{ theme }}"
|
>
|
||||||
{{ 'selected' if theme == request.cookies.get("theme", "white") else '' }}
|
{{ description }}
|
||||||
>
|
</option>
|
||||||
{{ description }}
|
{% endfor %}
|
||||||
</option>
|
</select>
|
||||||
{% endfor %}
|
</div>
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<ul class="site-footer-links">
|
<ul class="site-footer-links">
|
||||||
<li class="site-footer-link"><a href="https://docs.tildes.net">Docs</a></li>
|
<li class="site-footer-link"><a href="https://docs.tildes.net">Docs</a></li>
|
||||||
|
|||||||
Reference in New Issue
Block a user