Remove inline JS (#17)

This commit is contained in:
Wonderfall 2022-07-22 00:00:36 +02:00 committed by tommytran732
parent b9305c3738
commit a2fc137ec5
No known key found for this signature in database
GPG key ID: 060B29EB996BD9F2
8 changed files with 2056 additions and 2 deletions

9
assets/js/theme.js Normal file
View file

@ -0,0 +1,9 @@
// for now this is assuming default theme is set to dark
// will probably refactor in the future for much better handling
function loadPreferredTheme() {
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
}
loadPreferredTheme();