mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 15:32:14 +00:00
More optimisation and cleanup (#420)
This commit is contained in:
7
templates/partials/dark_theme.html
Normal file
7
templates/partials/dark_theme.html
Normal 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>
|
||||
Reference in New Issue
Block a user