mirror of
https://github.com/restoreddev/phpapprentice.git
synced 2025-08-05 06:17:37 +02:00
Using css custom properties and moving dark mode js to top of page
This commit is contained in:
4
assets/dark-mode.js
Normal file
4
assets/dark-mode.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var bodyTag = document.querySelector('body');
|
||||
if (localStorage.getItem('dark_mode') === 'true') {
|
||||
bodyTag.className = 'dark-mode';
|
||||
}
|
Reference in New Issue
Block a user