mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
css: deduplicate html/body reset; fix pages-edit.php invalid HTML
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 <link rel=stylesheet> was placed
inside <body> (after head.php was already closed), which is invalid. Add an
$extraCss hook to templates/admin/head.php so pages can inject <link> tags into
<head> 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
<script> and its inline init remain in <body> in the correct load order.
This commit is contained in:
4
TODO.md
4
TODO.md
@@ -474,7 +474,7 @@ Goal: rename the tables and column to the canonical M2M pattern (`tags`, `thesis
|
||||
|
||||
### E — CSS architecture
|
||||
|
||||
- [ ] **`html, body { margin:0; padding:0; height:100% }` repeated in 4 page stylesheets** —
|
||||
- [x] **`html, body { margin:0; padding:0; height:100% }` repeated in 4 page stylesheets** —
|
||||
`main.css`, `search.css`, `tfe.css`, `apropos.css` all open with this identical block.
|
||||
Move it to `common.css` once; delete from the four files. Same for the body-level flex-column
|
||||
shell (`display:flex; flex-direction:column; background:var(--white)`) which only differs in
|
||||
@@ -882,7 +882,7 @@ Once the above is applied, the following classes become deletable (element name
|
||||
|
||||
### XV — `public/admin/pages-edit.php`
|
||||
|
||||
- [ ] **`<link rel="stylesheet">` injected after `<main>` opens** — the EasyMDE stylesheet CDN
|
||||
- [x] **`<link rel="stylesheet">` injected after `<main>` opens** — the EasyMDE stylesheet CDN
|
||||
link is placed after the `</head>` has already closed (after `head.php` is included). It
|
||||
sits directly inside `<body>` before `<main>`. This is invalid HTML — `<link>` is a head
|
||||
element. Move it into the `<head>` by passing it to the head template via a `$extraCss`
|
||||
|
||||
Reference in New Issue
Block a user