From 1a24bed775139765b9dc660d04af8c504df14d37 Mon Sep 17 00:00:00 2001 From: Elijah R Date: Tue, 9 Apr 2024 01:42:37 -0400 Subject: [PATCH] add light mode toggle --- src/css/style.css | 40 ++++++++++++++++++++++++++-------------- src/html/index.html | 3 +++ src/ts/i18n.ts | 3 +++ src/ts/main.ts | 34 +++++++++++++++++++++++++++++++++- static/lang/en-us.json | 2 ++ 5 files changed, 67 insertions(+), 15 deletions(-) diff --git a/src/css/style.css b/src/css/style.css index 755781d..3a437fd 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -95,12 +95,34 @@ tr.user-moderator > td, .chat-username-moderator, .username-moderator { color: #00FF00 !important; } -tr.user-unregistered > td, .chat-username-unregistered, .username-unregistered { - color: #b1b1b1 !important; +html[data-bs-theme="dark"] { + tr.user-unregistered > td, .chat-username-unregistered, .username-unregistered { + color: #b1b1b1 !important; + } + + tr.user-registered > td, .chat-username-registered, .username-registered { + color: #FFFFFF !important; + } + + tr.user-registered.user-turn > td, tr.user-registered.user-waiting > td { + color: #000000 !important; + --bs-table-color: #000000 !important; + } + + tr.user-unregistered.user-turn > td, tr.user-unregistered.user-waiting > td { + color: #585858 !important; + --bs-table-color: #585858 !important; + } } -tr.user-registered > td, .chat-username-registered, .username-registered { - color: #FFFFFF !important; +html[data-bs-theme="light"] { + tr.user-unregistered > td, .chat-username-unregistered, .username-unregistered { + color: #6b6b6b !important; + } + + tr.user-registered > td, .chat-username-registered, .username-registered { + color: #000 !important; + } } tr.user-turn > td { @@ -122,16 +144,6 @@ tr.user-waiting > td { --bs-table-color: #000000; } -tr.user-registered.user-turn > td, tr.user-registered.user-waiting > td { - color: #000000 !important; - --bs-table-color: #000000 !important; -} - -tr.user-unregistered.user-turn > td, tr.user-unregistered.user-waiting > td { - color: #585858 !important; - --bs-table-color: #585858 !important; -} - .tr.user-waiting:hover, tr.user-waiting > td:hover { background-color: #ece1be !important; --bs-table-bg-state: #ece1be !important; diff --git a/src/html/index.html b/src/html/index.html index 95fdff7..44ca50d 100644 --- a/src/html/index.html +++ b/src/html/index.html @@ -224,6 +224,9 @@ +