From d7c76afa342c98220281bdadb7fcf2598e48624b Mon Sep 17 00:00:00 2001 From: Chongyi Zheng Date: Tue, 12 Mar 2024 14:02:02 -0400 Subject: Support dark mode theme (#142) * Support dark mode theme * Add dark mode to 404 and package pages * Fix tests --- templates/404.html | 5 +++++ templates/index.html | 8 ++++++++ templates/package.html | 7 +++++++ 3 files changed, 20 insertions(+) (limited to 'templates') diff --git a/templates/404.html b/templates/404.html index ab5b34a..1915091 100644 --- a/templates/404.html +++ b/templates/404.html @@ -2,6 +2,11 @@ +
diff --git a/templates/index.html b/templates/index.html index 8014921..53a41a2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,6 +16,14 @@ .table-header { display: block; } .inline-header { display: none; } } + + @media (prefers-color-scheme: dark) { + body { background-color: #333; color: #ddd; } + a { color: #ddd; } + a:visited { color: #bbb; } + .description { color: #bbb; } + .separator { border-color: #666; } + }
diff --git a/templates/package.html b/templates/package.html index 6183c51..281368a 100644 --- a/templates/package.html +++ b/templates/package.html @@ -3,6 +3,13 @@ + Nothing to see here. Please move along. -- cgit v1.2.3