forked from Ruderverein-Donau-Linz/rowt
[BUGFIX] login screen dark mode
This commit is contained in:
parent
895492946c
commit
8123299861
@ -77,18 +77,16 @@ function colorThemeWatcher() {
|
|||||||
function setTheme(theme: string, setLocalStorage = true) {
|
function setTheme(theme: string, setLocalStorage = true) {
|
||||||
let toggleBtn = document.querySelector('#theme-toggle-js');
|
let toggleBtn = document.querySelector('#theme-toggle-js');
|
||||||
|
|
||||||
if(toggleBtn) {
|
|
||||||
if (setLocalStorage) {
|
if (setLocalStorage) {
|
||||||
localStorage.setItem('theme', theme);
|
localStorage.setItem('theme', theme);
|
||||||
}
|
}
|
||||||
toggleBtn.setAttribute('data-theme', theme);
|
if (toggleBtn) toggleBtn.setAttribute('data-theme', theme);
|
||||||
|
|
||||||
if (document.documentElement.classList.contains('dark') && theme === 'light') {
|
if (document.documentElement.classList.contains('dark') && theme === 'light') {
|
||||||
document.documentElement.classList.remove('dark');
|
document.documentElement.classList.remove('dark');
|
||||||
} else if(theme === 'dark'){
|
} else if(theme === 'dark'){
|
||||||
document.documentElement.classList.add('dark');
|
document.documentElement.classList.add('dark');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCurrentdate(input: HTMLInputElement) {
|
function setCurrentdate(input: HTMLInputElement) {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</header>
|
</header>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="flex min-h-screen {%if not loggedin_user and not show_kiosk_header %} items-center {% else %} items-start {% endif %} justify-center px-4 py-12 sm:px-6 lg:px-8"> {% block content %}{% endblock content %}
|
<div class="flex min-h-screen {%if not loggedin_user and not show_kiosk_header %} items-center dark:bg-primary-900 {% else %} items-start {% endif %} justify-center px-4 py-12 sm:px-6 lg:px-8"> {% block content %}{% endblock content %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if loggedin_user %}
|
{% if loggedin_user %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user