diff --git a/enhance.js b/enhance.js index 195f727..91ca843 100644 --- a/enhance.js +++ b/enhance.js @@ -1,3 +1,5 @@ +// we try to use as little js as possible + document.addEventListener("DOMContentLoaded", () => { const copyright = document.getElementById("copyright") const copyrightText = copyright.innerText.replace("2018", new Date().getFullYear()); diff --git a/style.css b/style.css index 37d3915..2bbd915 100644 --- a/style.css +++ b/style.css @@ -1,18 +1,20 @@ +/* dark mode by default */ :root { - --background-color: 250, 249, 246; - --text-color: 0, 0, 0; + --background-color: 28, 27, 34; + --text-color: 255, 255, 255; --nav-color: var(--text-color); --nav-hover-color: var(--nav-color), 0.7; - --highlight-warn-color: 255, 225, 145; - --highlight-info-color: 150, 200, 255; + --highlight-warn-color: 200, 160, 45; + --highlight-info-color: 40, 100, 200; } -@media screen and (prefers-color-scheme: dark) { +/* light mode */ +@media screen and (prefers-color-scheme: light) { :root { - --background-color: 28, 27, 34; - --text-color: 255, 255, 255; - --highlight-warn-color: 200, 160, 45; - --highlight-info-color: 40, 100, 200; + --background-color: 250, 249, 246; + --text-color: 0, 0, 0; + --highlight-warn-color: 255, 225, 145; + --highlight-info-color: 150, 200, 255; } }