From a60e742d1a2039ac7857fca3930b71970ec27739 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Mon, 6 Apr 2026 15:06:52 +0200 Subject: [PATCH] Extract last 3 inline styles from admin templates into CSS classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit admin/thanks.php: -
→ class="admin-action-bar" -

→ class="admin-muted" admin/pages.php: - Éditer button style="font-size:.8rem;padding:.3rem .75rem;" → class="admin-btn admin-btn--sm" admin.css (Thesis info sections block): - Added .admin-action-bar { margin-top:1.5rem; display:flex; gap:0.75rem; flex-wrap:wrap } - Added .admin-muted { color: var(--text-secondary) } The only remaining inline style in any admin PHP file is the dynamic --disk-pct/--disk-color custom properties on the disk bar in system.php, which carry PHP runtime values and cannot be moved to static CSS. --- TODO.md | 2 ++ public/admin/pages.php | 2 +- public/admin/thanks.php | 4 ++-- public/assets/css/admin.css | 11 +++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 7ad9686..7c1586b 100644 --- a/TODO.md +++ b/TODO.md @@ -11,6 +11,8 @@ Pending tasks have been split into topic files under [`todo/`](todo/README.md): ## Recently completed (this session) +- [x] `admin/thanks.php` + `admin/pages.php` + `admin.css` — extracted last 3 inline `style=` attributes from admin PHP templates: `

` in `thanks.php` → `class="admin-action-bar"` (`.admin-action-bar` rule added to CSS); `

` in `thanks.php` → `class="admin-muted"` (`.admin-muted` rule added); `style="font-size:.8rem;padding:.3rem .75rem;"` on Éditer button in `pages.php` → `class="admin-btn admin-btn--sm"` (uses existing modifier). Only the dynamic `--disk-pct`/`--disk-color` CSS custom properties on the disk bar in `system.php` remain (carry PHP runtime values — legitimate). + - [x] `variables.css` + `search.css` — public dark-mode support via `@media (prefers-color-scheme: dark)` scoped to `body:not(.admin-body)`: all semantic tokens (`--bg-*`, `--text-*`, `--border-*`, `--accent-*`, status colours) overridden with dark equivalents; `--accent-primary` lightened to `#b87fd4` for WCAG contrast on dark backgrounds; `--search-error-*` variables added to replace hardcoded `#fff0f0`/`#c00` in `.search-error`; admin pages unaffected diff --git a/public/admin/pages.php b/public/admin/pages.php index d19fc5a..6d0c2aa 100644 --- a/public/admin/pages.php +++ b/public/admin/pages.php @@ -42,7 +42,7 @@ try { Éditer + class="admin-btn admin-btn--sm">Éditer diff --git a/public/admin/thanks.php b/public/admin/thanks.php index 86de651..cf8cdcf 100644 --- a/public/admin/thanks.php +++ b/public/admin/thanks.php @@ -138,14 +138,14 @@ $pageTitle = "Récapitulatif TFE"; -

+ -

Aucune donnée à afficher.

+

Aucune donnée à afficher.

Retour au formulaire

diff --git a/public/assets/css/admin.css b/public/assets/css/admin.css index 96a25ee..cd5994e 100644 --- a/public/assets/css/admin.css +++ b/public/assets/css/admin.css @@ -622,6 +622,17 @@ font-size: 0.9rem; } +.admin-action-bar { + margin-top: 1.5rem; + display: flex; + gap: 0.75rem; + flex-wrap: wrap; +} + +.admin-muted { + color: var(--text-secondary); +} + /* ── Section titles (account, etc.) ─────────────────────────────────────── */ .admin-section-title { font-size: 1rem;