mirror of
https://github.com/restoreddev/phpapprentice.git
synced 2025-08-07 07:16:45 +02:00
Using css custom properties and moving dark mode js to top of page
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
// Dark mode
|
||||
var bodyTag = document.querySelector('body');
|
||||
if (localStorage.getItem('dark_mode') === 'true') {
|
||||
bodyTag.className = 'dark-mode';
|
||||
}
|
||||
|
||||
var darkMode = document.getElementById('dark_mode');
|
||||
if (localStorage.getItem('dark_mode') === 'true') {
|
||||
darkMode.checked = true;
|
||||
|
Reference in New Issue
Block a user