From f20aab5f66b0cea191b55d8f085d09e7100237fc Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Sat, 28 Mar 2026 17:00:57 +0100 Subject: [PATCH] css: deduplicate html/body reset; fix pages-edit.php invalid HTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the repeated 'html, body { margin:0; padding:0; height:100% }' block from main.css, search.css, tfe.css, and apropos.css into the single canonical location in common.css. All four public page stylesheets already load common.css first, so the rule applies identically — no visual change. Fix pages-edit.php invalid HTML: the EasyMDE was placed inside (after head.php was already closed), which is invalid. Add an $extraCss hook to templates/admin/head.php so pages can inject tags into via an array variable, matching the pattern already used by the public templates/public/head.php. Also add a symmetric $extraJs hook to templates/admin/footer.php for future use. pages-edit.php now sets $extraCss = ['easymde.min.css'] before requiring head.php; the EasyMDE JS - diff --git a/public/assets/apropos.css b/public/assets/apropos.css index e9f189f..cf198a8 100644 --- a/public/assets/apropos.css +++ b/public/assets/apropos.css @@ -2,12 +2,6 @@ À PROPOS PAGE (apropos.php) ============================================================ */ -html, body { - margin: 0; - padding: 0; - height: 100%; -} - .apropos-body { display: flex; flex-direction: column; diff --git a/public/assets/common.css b/public/assets/common.css index a6e5a47..fa11f97 100644 --- a/public/assets/common.css +++ b/public/assets/common.css @@ -24,9 +24,14 @@ box-sizing: border-box; } +html, body { margin: 0; padding: 0; + height: 100%; +} + +body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--white); diff --git a/public/assets/main.css b/public/assets/main.css index a3470ee..bf1f32f 100644 --- a/public/assets/main.css +++ b/public/assets/main.css @@ -2,12 +2,6 @@ HOME PAGE (index.php) ============================================================ */ -html, body { - margin: 0; - padding: 0; - height: 100%; -} - .home-body { display: flex; flex-direction: column; diff --git a/public/assets/search.css b/public/assets/search.css index ed7e0f1..c9fdb37 100644 --- a/public/assets/search.css +++ b/public/assets/search.css @@ -2,12 +2,6 @@ RÉPERTOIRE / SEARCH PAGE (search.php) ============================================================ */ -html, body { - margin: 0; - padding: 0; - height: 100%; -} - .search-body { display: flex; flex-direction: column; diff --git a/public/assets/tfe.css b/public/assets/tfe.css index 8a1f121..b399666 100644 --- a/public/assets/tfe.css +++ b/public/assets/tfe.css @@ -2,12 +2,6 @@ TFE INDIVIDUAL PAGE (tfe.php) ============================================================ */ -html, body { - margin: 0; - padding: 0; - height: 100%; -} - .tfe-body { display: flex; flex-direction: column; diff --git a/templates/admin/footer.php b/templates/admin/footer.php index 308b1d0..615d1bc 100644 --- a/templates/admin/footer.php +++ b/templates/admin/footer.php @@ -1,2 +1,5 @@ + + + diff --git a/templates/admin/head.php b/templates/admin/head.php index 16ae287..c9167da 100644 --- a/templates/admin/head.php +++ b/templates/admin/head.php @@ -7,6 +7,9 @@ + + +