add auto dark mode to baseof html

This commit is contained in:
Lutz Reinhardt
2022-01-24 17:23:09 +01:00
parent 6aae5908fd
commit 57066e92a6
+5
View File
@@ -79,6 +79,11 @@
$('.text-dark').addClass('darkmode-text-dark').removeClass('text-dark'); $('.text-dark').addClass('darkmode-text-dark').removeClass('text-dark');
$('.text-muted').addClass('darkmode-text-muted').removeClass('text-muted'); $('.text-muted').addClass('darkmode-text-muted').removeClass('text-muted');
}; };
let darkmode = window.matchMedia('(prefers-color-scheme: dark)').matches;
if (darkmode) {
$(".darkmode-label").click();
}
</script> </script>
</body> </body>
{{ else }} {{ else }}