commit b82dae0504120d95eb77d2e4e80fceef35f41d9e
parent 97c2e72c1fe305eaa014a448dd0a1b3754273d6e
Author: Alex Balgavy <alex@balgavy.eu>
Date: Thu, 8 Jul 2021 19:22:24 +0200
Change dark theme time interval
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/base.html b/templates/base.html
@@ -9,7 +9,7 @@
if (window.matchMedia('(prefers-color-scheme: dark)').media === 'not all') {
document.documentElement.style.display = 'none';
var hour = new Date().getHours();
- var sheet = (hour >= 18 || hour < 7) ? "/dark.css" : "/light.css";
+ var sheet = (hour >= 20 || hour < 6) ? "/dark.css" : "/light.css";
document.head.insertAdjacentHTML(
'beforeend',
'<link rel="stylesheet" type="text/css" href="'+sheet+'" onload="document.documentElement.style.display = \'\'">'