summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2021-03-05 08:39:41 -0700
committerDavid Luevano Alvarado <david@luevano.xyz>2021-03-05 08:39:41 -0700
commit7c31d84f9450aca3b366a556db85bdd494fff2f9 (patch)
tree0a88980e443b910a8cd1a51ce6a3f29d22e15f8d /static
parent2602134143b9b3891d564c682457308f6eb9d20e (diff)
Add new video tutorial notes
Diffstat (limited to 'static')
-rw-r--r--static/scripts/theme.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/static/scripts/theme.js b/static/scripts/theme.js
index 2ffe621..4bfa68e 100644
--- a/static/scripts/theme.js
+++ b/static/scripts/theme.js
@@ -6,20 +6,23 @@ window.onload = () => {
if(theme == null){
local_storage.setItem('theme', 'dark');
- }
-
- if(theme == 'dark'){
switch_theme.checked = true;
}
else{
- switch_theme.checked = false;
+ if(theme == 'dark'){
+ switch_theme.checked = true;
+ }
+ else{
+ switch_theme.checked = false;
- let theme = document.getElementById('theme-css');
- let href = theme.getAttribute('href');
+ let theme = document.getElementById('theme-css');
+ let href = theme.getAttribute('href');
- href = href.replace('dark.css', 'light.css');
- theme.setAttribute('href', href);
+ href = href.replace('dark.css', 'light.css');
+ theme.setAttribute('href', href);
+ }
}
+
}
function setTheme(){