From 3d1e5733cc8064f6526ca100aded2f08309b0de5 Mon Sep 17 00:00:00 2001 From: TL <37297314+rowenslee@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:16:26 +0700 Subject: [PATCH] feat: add dark theme support for static html files (#373) * Add dark theme styling * Add auto detect preferred color scheme --- resources/css/style.css | 25 +++++++++++++++++++++++++ resources/index.html | 5 +++++ resources/invoices.html | 5 +++++ resources/terms.html | 6 ++++++ 4 files changed, 41 insertions(+) diff --git a/resources/css/style.css b/resources/css/style.css index 1ec11f2d..5acc3138 100644 --- a/resources/css/style.css +++ b/resources/css/style.css @@ -175,4 +175,29 @@ right: 8px; top: 38px; } +} + +/* Dark Theme Styles */ +@media (prefers-color-scheme: dark) { + body.dark-theme { + background-color: #2a2a2a; /* Softer gray background */ + color: #e0e0e0; + } + body.dark-theme h1 { + color: #e0e0e0; + } + body.dark-theme p { + color: #b0b0b0; + } + body.dark-theme .btn-primary { + background-color: #3a3a3a; + border-color: #545454; + } + body.dark-theme .btn-primary:hover { + background-color: #545454; + } + body.dark-theme .card { + background-color: #3a3a3a; + border-color: #545454; + } } \ No newline at end of file diff --git a/resources/index.html b/resources/index.html index b4e4ca1d..07f3e735 100644 --- a/resources/index.html +++ b/resources/index.html @@ -151,6 +151,11 @@