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

@@ -0,0 +1,7 @@
{% load static %}
<script>
if({{ request.user.dark_theme|lower|default:'false' }} || window.matchMedia('(prefers-color-scheme: dark)').matches) {
$('<link>').prependTo('head').attr({type : 'text/css', rel : 'stylesheet'}).attr('href', '{% static "css/dark_screen.css" %}');
document.body.setAttribute('data-theme', 'dark');
}
</script>