mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
@@ -1,7 +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.querySelector('head').innerHTML += '<link rel="stylesheet" href="{% static "css/dark_screen.css" %}" type="text/css"/>';
|
||||
document.body.setAttribute('data-theme', 'dark');
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user