From a31a3bdbef31647bc8e475f225adf2b7288b8b31 Mon Sep 17 00:00:00 2001 From: rowenslee Date: Mon, 14 Oct 2024 12:38:19 +0700 Subject: [PATCH] Add auto detect preferred color scheme --- resources/index.html | 5 +++++ resources/invoices.html | 5 +++++ resources/terms.html | 6 ++++++ 3 files changed, 16 insertions(+) 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 @@ if (processor === 'zebedee') { document.getElementById('powered-by-zebedee').classList.remove('d-none') } + + // Check for system preference on load + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { + document.body.classList.add('dark-theme'); + } } diff --git a/resources/invoices.html b/resources/invoices.html index 83efab47..94dc1f3e 100644 --- a/resources/invoices.html +++ b/resources/invoices.html @@ -98,6 +98,11 @@

Invoice expired!

+