Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gurusabarish/hugo-profile.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Reinhardt <lr1980@users.noreply.github.com>2021-12-29 20:40:23 +0300
committerLutz Reinhardt <lr1980@users.noreply.github.com>2021-12-29 20:41:11 +0300
commit6aae5908fd3df429d9dfde4753d7cd9eb640772e (patch)
tree4ccfa38d1524da3edc0a28dd5dc765d1ecc9b9cf /layouts
parentf279e15318144b36f695c73f90cbf277442743f6 (diff)
set automatically dark mode
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html
index b1a03bd..f3edb59 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -167,6 +167,11 @@
$(".education-backdark").toggleClass("education-back");
$(".achievements-backdark").toggleClass("achievements-back");
}
+
+ let darkmode = window.matchMedia('(prefers-color-scheme: dark)').matches;
+ if (darkmode) {
+ $(".darkmode-label").click();
+ }
</script>
</body>
{{ else }}