Added darkmode, but it is not persistent yet.

This commit is contained in:
Greenscreener 2019-07-16 15:22:58 +02:00
parent 0bbb8b0de6
commit 984c0e16d6
3 changed files with 13 additions and 0 deletions

View File

@ -100,4 +100,11 @@ h2 a {
margin-right: 0.3em;
color: $link;
}
.dark-mode, .dark-mode * {
background-color: $black-ter !important;
color: white !important;
a {
color: $link !important;
}
}
// /Custom styles

View File

@ -0,0 +1,5 @@
document.addEventListener("DOMContentLoaded", () => {
if (window.location.search.indexOf("darkmode=true") > -1) {
document.getElementById("content").classList.add("dark-mode");
}
});

View File

@ -13,6 +13,7 @@
{{ block "js" . -}}
{{ partial "js.html" "js/headerLink.js" }}
{{ partial "js.html" "js/patek-logo-custom-element/patekLogo.js" }}
{{ partial "js.html" "js/darkMode.js" }}
{{ end }}
<body>
{{ block "body" . }}