Added darkmode, but it is not persistent yet.
This commit is contained in:
parent
0bbb8b0de6
commit
984c0e16d6
@ -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
|
||||
5
themes/patek/assets/js/darkMode.js
Normal file
5
themes/patek/assets/js/darkMode.js
Normal file
@ -0,0 +1,5 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
if (window.location.search.indexOf("darkmode=true") > -1) {
|
||||
document.getElementById("content").classList.add("dark-mode");
|
||||
}
|
||||
});
|
||||
@ -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" . }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user