From a06fd5da7639ed372afea1141e8d670b714dbd01 Mon Sep 17 00:00:00 2001 From: error Date: Sat, 5 Nov 2022 14:02:07 +0100 Subject: [PATCH] add dark mode to rest of theme --- static/css/undef.css | 22 +++++++++++++++++++++- templates/base.html | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/static/css/undef.css b/static/css/undef.css index af587cd..bac55e8 100644 --- a/static/css/undef.css +++ b/static/css/undef.css @@ -10,9 +10,21 @@ { --teal: #008080; --maroon: #800000; + --img-border: #FFFFFF; --gradient: linear-gradient(45deg, #800000 10%, #008080 90%); } +@media (prefers-color-scheme: dark) +{ + :root + { + --teal: #7acccc; + --maroon: #cc7a7a; + --img-border: hsl(0, 1%, 25%); + --gradient: linear-gradient(45deg, #cc7a7a 10%, #7acccc 90%); + } +} + /* overwrite latex.css colors */ a, a:visited { @@ -145,12 +157,20 @@ figcaption::before left: 0px; width: 100%; height: 100vh; - background-color: hsl(210, 20%, 98%); + background-color: var(--body-bg-color); text-align: center; z-index: 666; visibility: hidden; } +img +{ + border-style: solid; + border-width: 4px; + border-color: var(--img-border); + border-radius: 4px; +} + figure:target .lightbox { visibility: visible; diff --git a/templates/base.html b/templates/base.html index bd289b5..ac9fe1d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,7 +23,7 @@ {% endif %} {% endblock head %} - +