1
0
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:
Andrew Davis
2020-02-03 18:11:22 -06:00
parent 5ed7a72db1
commit 56464d4ea8
7 changed files with 145 additions and 112 deletions

4
assets/dark-mode.js Normal file
View File

@@ -0,0 +1,4 @@
var bodyTag = document.querySelector('body');
if (localStorage.getItem('dark_mode') === 'true') {
bodyTag.className = 'dark-mode';
}