From 6608c0ba8d7bb380bd714163f74278ff05d42a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szarvas?= Date: Tue, 18 Jun 2024 14:25:10 +0200 Subject: [PATCH 1/2] Add dark mode to the website Color values are from the htmx website --- www/index.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/www/index.html b/www/index.html index 228d598..5353633 100644 --- a/www/index.html +++ b/www/index.html @@ -9,6 +9,8 @@ max-width: 768px; margin: auto; padding: 4px 4px; + background-color: var(--bgColor); + color: var(--textColor); } .blue { @@ -40,6 +42,9 @@ padding: 12px; border-radius: 4px; margin-bottom: 12px; + background-color: var(--bgColor); + color: var(--textColor); + border-color: var(--textColor); } main { @@ -61,6 +66,30 @@ padding: 12px; line-height: 1.8em; } + + + a { + color: var(--linkColor); + } + + a:hover { + opacity: 0.6; + } + + + :root { + --bgColor: #ffffff; + --textColor: #1f1f1f; + --linkColor: #3366cc; + } + + @media (prefers-color-scheme: dark) { + :root { + --bgColor: #1f1f1f; + --textColor: #ffffff; + --linkColor: #5b96d5; + } + } From 38f1853e96a1e3bca7ac5859b6d12dc40569d9d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szarvas?= Date: Tue, 18 Jun 2024 14:31:04 +0200 Subject: [PATCH 2/2] Remove empty lines --- www/index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/www/index.html b/www/index.html index 5353633..2869d60 100644 --- a/www/index.html +++ b/www/index.html @@ -67,7 +67,6 @@ line-height: 1.8em; } - a { color: var(--linkColor); } @@ -76,7 +75,6 @@ opacity: 0.6; } - :root { --bgColor: #ffffff; --textColor: #1f1f1f;