diff --git a/_includes/header-custom.html b/_includes/header-custom.html
index 47c3f56..4a91700 100644
--- a/_includes/header-custom.html
+++ b/_includes/header-custom.html
@@ -14,5 +14,4 @@
Weekly
Periodical
-
diff --git a/js/main.js b/js/main.js
index eb7d802..f2be28d 100644
--- a/js/main.js
+++ b/js/main.js
@@ -8,21 +8,21 @@ const toggleSwitch = document.querySelector('.switch input[type="checkbox"]');
const currentTheme = localStorage.getItem('theme');
if (currentTheme) {
- document.documentElement.setAttribute('data-theme', currentTheme);
-
- if (currentTheme === 'dark') {
- toggleSwitch.checked = true;
- }
+ document.documentElement.setAttribute('data-theme', currentTheme);
+
+ if (currentTheme === 'dark') {
+ toggleSwitch.checked = true;
+ }
}
function switchTheme(e) {
- if (e.target.checked) {
- document.documentElement.setAttribute('data-theme', 'dark');
- localStorage.setItem('theme', 'dark');
- } else {
+ if (e.target.checked) {
+ document.documentElement.setAttribute('data-theme', 'dark');
+ localStorage.setItem('theme', 'dark');
+ } else {
document.documentElement.setAttribute('data-theme', 'light');
- localStorage.setItem('theme', 'light');
- }
+ localStorage.setItem('theme', 'light');
+ }
}
toggleSwitch.addEventListener('change', switchTheme, false);