From b48501d8e4b9e8f9e619bba7d30633f068d418bb Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Mon, 22 Jun 2026 19:39:12 +0000 Subject: [PATCH] feat(web): light/dark mode cu comutator persistat + anti-FOUC (PRD 5.3) Tema light ca bloc [data-theme="light"] peste variabilele :root (dark nemodificat la octet). Comutator soare/luna in header pe toate paginile, default OS-aware (prefers-color-scheme, fallback dark), persistenta in localStorage doar la comutare explicita, script anti-FOUC in pre-paint. Suprafetele de stare hardcodate convertite la color-mix in base.html + 7 fragmente _*.html (light lizibil, contrast WCAG AA). Co-Authored-By: Claude Opus 4.8 (1M context) --- app/web/templates/_banner.html | 2 +- app/web/templates/_mapcoloane.html | 2 +- app/web/templates/_preview_import.html | 4 +- app/web/templates/_preview_rand.html | 4 +- app/web/templates/_status.html | 2 +- app/web/templates/_trimitere_detaliu.html | 2 +- app/web/templates/_upload.html | 4 +- app/web/templates/base.html | 65 +++++- docs/ROADMAP.md | 4 +- docs/prd/prd-5.3-light-dark-mode.md | 256 ++++++++++++++++++++++ tests/test_tema.py | 186 ++++++++++++++++ 11 files changed, 515 insertions(+), 16 deletions(-) create mode 100644 docs/prd/prd-5.3-light-dark-mode.md create mode 100644 tests/test_tema.py diff --git a/app/web/templates/_banner.html b/app/web/templates/_banner.html index 0610d31..bc1dcb3 100644 --- a/app/web/templates/_banner.html +++ b/app/web/templates/_banner.html @@ -1,5 +1,5 @@ {% if not account_active %} - {% if message %} -
{{ message }}
@@ -56,7 +56,7 @@ {% if unmapped_ops %} -
+

Operatii de mapat la cod RAR

Aceste operatii din fisier nu au inca un cod RAR. Alege codul (sugestia e diff --git a/app/web/templates/_preview_rand.html b/app/web/templates/_preview_rand.html index 00e1e7f..9fda196 100644 --- a/app/web/templates/_preview_rand.html +++ b/app/web/templates/_preview_rand.html @@ -31,12 +31,12 @@

{% if message %} - {% endif %} diff --git a/app/web/templates/_status.html b/app/web/templates/_status.html index 9fe2fb0..1f04a0c 100644 --- a/app/web/templates/_status.html +++ b/app/web/templates/_status.html @@ -6,7 +6,7 @@ {% if not account_active %}
+ background:color-mix(in srgb, var(--warn) 12%, var(--card)); border-radius:6px; font-size:13px;"> Cont in asteptare de activare. Configureaza credentialele RAR si pregateste importul acum; trimiterea catre RAR porneste automat dupa activare de catre administrator. diff --git a/app/web/templates/_trimitere_detaliu.html b/app/web/templates/_trimitere_detaliu.html index 88dde96..4e3adb7 100644 --- a/app/web/templates/_trimitere_detaliu.html +++ b/app/web/templates/_trimitere_detaliu.html @@ -49,7 +49,7 @@

Corecteaza si re-trimite

{% if corectie_msg %} -
{{ corectie_msg }}
{% endif %} diff --git a/app/web/templates/_upload.html b/app/web/templates/_upload.html index 182e69b..b97a358 100644 --- a/app/web/templates/_upload.html +++ b/app/web/templates/_upload.html @@ -9,12 +9,12 @@ {% endif %} {% if error %} - {% endif %} {% if sheets %} -
+
Fisierul are mai multe foi de lucru. Alege foaia de mai jos si incarca din nou.
{% endif %} diff --git a/app/web/templates/base.html b/app/web/templates/base.html index 8ad7870..cc559ad 100644 --- a/app/web/templates/base.html +++ b/app/web/templates/base.html @@ -13,9 +13,26 @@ // useTemplateFragments parseaza tot intr-un