From a5bb593f6dfafcee27efd9547063f820b4fe1d6d Mon Sep 17 00:00:00 2001 From: Jadowyne Ulve Date: Sat, 9 Aug 2025 18:59:43 -0500 Subject: [PATCH] Setup darkmode and signup_enabled in html form --- .../__pycache__/access_api.cpython-313.pyc | Bin 8593 -> 8631 bytes application/access_module/access_api.py | 2 +- .../access_module/static/css/logins-dark.css | 58 ++++++++++++++++++ .../access_module/templates/login.html | 8 ++- application/items/templates/index.html | 19 +++++- application/poe/templates/receipts.html | 17 +++++ database.ini | 2 +- static/css/dark-mode.css | 38 ++++++------ 8 files changed, 120 insertions(+), 24 deletions(-) create mode 100644 application/access_module/static/css/logins-dark.css diff --git a/application/access_module/__pycache__/access_api.cpython-313.pyc b/application/access_module/__pycache__/access_api.cpython-313.pyc index 3b740148391e976f1a2153d6ac44cc1826d8fb2c..eb82d7844039312e37a0ca781a3d6ead7ee68dfb 100644 GIT binary patch delta 453 zcmbQ}yxp1iGcPX}0}#x8Fg;`HMqUd(COekNbJ&$8pJn6PT+Elu$SA$}I{!LGo=}Eh zNmii3U@1$c$-RQIj4LLu7QD#GY0E6nkjAJfv$<7Bfl>JuUvXx7UTHymYF=VePHKuK z<1K!WNIXJl^HO0oMy@KLQGP&N{B-kGkv2xY9r71EBQIJ;UF43wz!E(s2QTw6V=&uH%7csbxPY1mE9-GHMiASa z1t@!hl@-W7!Nm+>^KyB}uvc;Erz93k{T#bKWHXb>mx@bzKA~oH zjox=IqFs%RXXro@NC9ae1Bk#1unJ^>98ds?z#3pM!cN149tY-uQD7Y?0UN+3u)r{# z3_m&RcB3-A>Gp88{{dD=!*?(OA7|_UWuPDM0$q#`$7HUcm9qM@vCoc(ZL^mg`Cr8F QH@0xmFD`(>B-u0f2N{-brT_o{ diff --git a/application/access_module/access_api.py b/application/access_module/access_api.py index 6347024..4d65a27 100644 --- a/application/access_module/access_api.py +++ b/application/access_module/access_api.py @@ -111,7 +111,7 @@ def login(): if 'user' not in session.keys(): session['user'] = None - return render_template("login.html") + return render_template("login.html", sign_up_enabled=instance_config['signup_enabled']) @access_api.route('/dashboard') def dashboard(): diff --git a/application/access_module/static/css/logins-dark.css b/application/access_module/static/css/logins-dark.css new file mode 100644 index 0000000..3379eb5 --- /dev/null +++ b/application/access_module/static/css/logins-dark.css @@ -0,0 +1,58 @@ +:root { + --background: #121212; + --background-text: #ffffff; + + --surface: #121212; + --surface-text: #ffffff; + + --surface-two: #252525; + + --error: #CF6679; + --error-text: #000000; + + --primary-color: #4e76aa; + --primary-text: #ffffff; + + --secondary-color: #03DAC6; + --secondary-text: #000000; + + --elevation-low: 0 1px 3px rgba(0, 0, 0, 0.2); + --elevation-medium: 0 3px 6px rgba(0, 0, 0, 0.3); + --elevation-high: 0 10px 20px rgba(0, 0, 0, 0.4); + + --radius: 10px; + +} +@media (prefers-color-scheme: dark) { + body, html { + background: var(--background) !important; + } + + .uk-card { + background: var(--surface); + color: var(--surface-text); + box-shadow: var(--elevation-low); + border-radius: var(--radius); + } + + .uk-card.uk-card-default::before { + content: ''; + position: absolute; + border-radius: var(--radius); + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(255, 255, 255, 0.05); + pointer-events: none; + } + + .uk-input.uk-disabled { + background-color: var(--background-secondary); + } + + .uk-input { + border-color: var(--border-color); + box-shadow: var(--elevation-low); + } +} \ No newline at end of file diff --git a/application/access_module/templates/login.html b/application/access_module/templates/login.html index 74aa44b..7c3c246 100644 --- a/application/access_module/templates/login.html +++ b/application/access_module/templates/login.html @@ -15,14 +15,14 @@ - + - +
@@ -30,7 +30,9 @@
@@ -58,6 +60,7 @@ Login with Authentik
+ {% if signup_enabled %}
@@ -96,6 +99,7 @@
+ {% endif %}
diff --git a/application/items/templates/index.html b/application/items/templates/index.html index 4689944..fc7867b 100644 --- a/application/items/templates/index.html +++ b/application/items/templates/index.html @@ -23,17 +23,22 @@ + {% if session['user']['flags']['darkmode'] %} {% else %} {% endif %} -