Merge branch 'dark-mode' into staging
This commit is contained in:
commit
48f26a1379
@ -77,17 +77,15 @@ function colorThemeWatcher() {
|
||||
function setTheme(theme: string, setLocalStorage = true) {
|
||||
let toggleBtn = document.querySelector('#theme-toggle-js');
|
||||
|
||||
if(toggleBtn) {
|
||||
if (setLocalStorage) {
|
||||
localStorage.setItem('theme', theme);
|
||||
}
|
||||
toggleBtn.setAttribute('data-theme', theme);
|
||||
if (setLocalStorage) {
|
||||
localStorage.setItem('theme', theme);
|
||||
}
|
||||
if (toggleBtn) toggleBtn.setAttribute('data-theme', theme);
|
||||
|
||||
if (document.documentElement.classList.contains('dark') && theme === 'light') {
|
||||
document.documentElement.classList.remove('dark');
|
||||
} else if(theme === 'dark'){
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
if (document.documentElement.classList.contains('dark') && theme === 'light') {
|
||||
document.documentElement.classList.remove('dark');
|
||||
} else if(theme === 'dark'){
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
</header>
|
||||
{% 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>
|
||||
|
||||
{% if loggedin_user %}
|
||||
|
Loading…
Reference in New Issue
Block a user