diff options
author | Lutz Reinhardt <lr1980@users.noreply.github.com> | 2021-12-29 20:40:23 +0300 |
---|---|---|
committer | Lutz Reinhardt <lr1980@users.noreply.github.com> | 2021-12-29 20:41:11 +0300 |
commit | 6aae5908fd3df429d9dfde4753d7cd9eb640772e (patch) | |
tree | 4ccfa38d1524da3edc0a28dd5dc765d1ecc9b9cf /layouts | |
parent | f279e15318144b36f695c73f90cbf277442743f6 (diff) |
set automatically dark mode
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/index.html | 5 |
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 }} |