add auto dark mode to baseof html
This commit is contained in:
@@ -79,6 +79,11 @@
|
||||
$('.text-dark').addClass('darkmode-text-dark').removeClass('text-dark');
|
||||
$('.text-muted').addClass('darkmode-text-muted').removeClass('text-muted');
|
||||
};
|
||||
|
||||
let darkmode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
if (darkmode) {
|
||||
$(".darkmode-label").click();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
{{ else }}
|
||||
|
||||
Reference in New Issue
Block a user