This commit is contained in:
2021-02-22 12:38:57 +00:00
parent 5edb61f243
commit 28a70667c2
10 changed files with 22 additions and 17 deletions

View File

@@ -80,12 +80,7 @@
<div class="modal fade" id="modal" role="dialog" tabindex=-1></div>
<script src="{% static 'js/base.js' %}"></script>
<script>
if({{ request.user.dark_theme|lower|default:'false' }} || window.matchMedia('(prefers-color-scheme: dark)').matches) {
$('<link>').appendTo('head').attr({type : 'text/css', rel : 'stylesheet'}).attr('href', '{% static "css/dark_screen.css" %}');
document.body.setAttribute('data-theme', 'dark');
}
</script>
{% include 'partials/dark_theme.html' %}
{% block js %}
{% endblock %}
</body>