From ac7f24671a043a40e326cf2e6d771bd93ddbb370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Sun, 9 Jan 2022 01:04:05 +0100 Subject: [PATCH] Add dark mode to homepage. --- static/homepage.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/static/homepage.html b/static/homepage.html index 2f4df97..31c43ba 100644 --- a/static/homepage.html +++ b/static/homepage.html @@ -20,7 +20,7 @@ padding: 1ex; border-radius: 4px; width: 100%; - max-width: calc(100vw - 4ex); + max-width: calc(100% - 2ex); } .links section h2 { margin-top: 0; @@ -38,6 +38,24 @@ padding-right: 0.5ex; border-right: 1px solid #000; } + @media (prefers-color-scheme: dark) { + html { + background-color: #0f110e; + color: #fafafe; + } + h2 a { + color: #fafafe; + } + a { + color: #66f; + } + #social a { + border-color: #fff; + } + .links section { + background-color: #262826; + } + }