From 58eaf5369492aef45529f63d00d9ccc94d57f080 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Mon, 1 Apr 2024 17:53:19 -0700 Subject: [PATCH] Dark theme fixes for Microsoft Edge --- web/static/css/bulma-dark-theme.css | 5 +++ web/static/css/dark-theme.css | 46 ++++++++++++++++++++++++++ web/static/css/nonshy-prefers-dark.css | 5 +++ web/templates/account/dashboard.html | 2 +- web/templates/base.html | 2 ++ web/templates/forum/board_index.html | 6 ++-- web/templates/forum/index.html | 6 ++-- web/templates/forum/thread.html | 6 ++-- web/templates/index.html | 6 ++-- web/templates/photo/permalink.html | 2 +- 10 files changed, 70 insertions(+), 16 deletions(-) create mode 100644 web/static/css/dark-theme.css create mode 100644 web/static/css/nonshy-prefers-dark.css diff --git a/web/static/css/bulma-dark-theme.css b/web/static/css/bulma-dark-theme.css index 89018db..7198c11 100644 --- a/web/static/css/bulma-dark-theme.css +++ b/web/static/css/bulma-dark-theme.css @@ -1,4 +1,9 @@ /* Forced dark theme for Bulma (custom created for nonshy) */ + +/* nonshy custom overrides */ +@import url("dark-theme.css"); + +/* Copied from bulma.css - original dark theme styles */ :root { --bulma-white-on-scheme-l: 100%; --bulma-white-on-scheme: hsla(var(--bulma-white-h), var(--bulma-white-s), var(--bulma-white-on-scheme-l), 1); diff --git a/web/static/css/dark-theme.css b/web/static/css/dark-theme.css new file mode 100644 index 0000000..d4c6829 --- /dev/null +++ b/web/static/css/dark-theme.css @@ -0,0 +1,46 @@ +/* Custom nonshy color overrides for Bulma's dark theme */ + +/* nonshy custom overrides */ +.has-background-primary-light { + background-color: rgba(28, 166, 76, 0.25) !important; +} + +.has-background-success-light, .has-background-success { + background-color: rgba(19, 71, 37, 0.685) !important +} + +.has-background-warning-light, .has-background-warning, .nonshy-navbar-notification-tag.is-warning { + background-color: rgb(100, 90, 41) !important; +} + +.has-background-link-light { + background-color: rgba(15, 129, 204, 0.25) !important; +} + +.has-text-dark { + /* note: this css file otherwise didn't override this, dark's always dark, brighten it! */ + color: #b5b5b5 !important; +} + +a.has-text-dark:focus, +a.has-text-dark:hover { + color: #d5d5d5 !important; +} + +.modal-background { + background-color: rgba(0, 0, 0, 0.86) !important; +} + +/* Tag color overrides */ +.tag.is-grey { + background-color: #3f3f3f; + color: #eee; +} +.tag.is-danger.is-light { + background-color: #500; + color: #FCC; +} +.tag.is-warning { + background-color: #550; + color: #FFC; +} diff --git a/web/static/css/nonshy-prefers-dark.css b/web/static/css/nonshy-prefers-dark.css new file mode 100644 index 0000000..1480129 --- /dev/null +++ b/web/static/css/nonshy-prefers-dark.css @@ -0,0 +1,5 @@ +/* Custom nonshy color overrides for Bulma's dark theme + (prefers-dark edition) */ +@media (prefers-color-scheme: dark) { + @import url("dark-theme.css"); +} \ No newline at end of file diff --git a/web/templates/account/dashboard.html b/web/templates/account/dashboard.html index c5d1bff..28e9727 100644 --- a/web/templates/account/dashboard.html +++ b/web/templates/account/dashboard.html @@ -269,7 +269,7 @@
-

Notifications

+

Notifications

diff --git a/web/templates/base.html b/web/templates/base.html index 9d40254..3c03cbc 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -13,6 +13,8 @@ {{else if eq .WebsiteTheme "dark"}} + {{else}} + {{end}} diff --git a/web/templates/forum/board_index.html b/web/templates/forum/board_index.html index 1d2eaa0..f37ec3b 100644 --- a/web/templates/forum/board_index.html +++ b/web/templates/forum/board_index.html @@ -5,10 +5,8 @@

- - - {{.Forum.Title}} - + + {{.Forum.Title}}

diff --git a/web/templates/forum/index.html b/web/templates/forum/index.html index 7e5487e..0affced 100644 --- a/web/templates/forum/index.html +++ b/web/templates/forum/index.html @@ -83,21 +83,21 @@
{{if .Explicit}} - + Explicit {{end}} {{if .Privileged}} - + Privileged {{end}} {{if .PermitPhotos}} - + Photos diff --git a/web/templates/forum/thread.html b/web/templates/forum/thread.html index b563cd6..9373a65 100644 --- a/web/templates/forum/thread.html +++ b/web/templates/forum/thread.html @@ -5,10 +5,8 @@

- - - {{.Forum.Title}} - + + {{.Forum.Title}}

diff --git a/web/templates/index.html b/web/templates/index.html index 152aabd..b89a996 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -107,7 +107,7 @@