Unverified Commit e98fdc31 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

html_start: there is no theme switcher, so no need to use localstorage

parent 047aab9d
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -16,21 +16,8 @@
				old.href = path;
			}
		}
		var otherTheme = {
			'dark': 'light',
			'light': 'dark',
		};
		var currentTheme = localStorage.getItem('theme');
		if (!otherTheme.hasOwnProperty(currentTheme)) {
			currentTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
		}
		addStyleSheet(currentTheme, 'theme');

		function toggleTheme() {
			currentTheme = otherTheme[currentTheme] || 'light';
			localStorage.setItem('theme', currentTheme);
		const currentTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
		addStyleSheet(currentTheme, 'theme');
		}
	</script>
	<script src=".data/js/glightbox.min.js"></script>
</head>