Scaffold containerized Django/Wagtail app with core features
This commit is contained in:
7
static/js/theme.js
Normal file
7
static/js/theme.js
Normal file
@@ -0,0 +1,7 @@
|
||||
(function () {
|
||||
window.toggleTheme = function toggleTheme() {
|
||||
const root = document.documentElement;
|
||||
root.classList.toggle('dark');
|
||||
localStorage.setItem('theme', root.classList.contains('dark') ? 'dark' : 'light');
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user