mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 11:39:18 +02:00
The file had accumulated severe corruption in its lower half (garbled selector text, variable names spliced into property values, orphaned declarations, broken nesting) alongside hardcoded hex colours throughout. Rewrote the entire file cleanly: - Every colour is now a var() referencing a token defined in variables.css: --accent-primary/secondary/foreground, --accent-blue/green/yellow/red, --bg-secondary/tertiary, --border-primary, --text-primary/secondary/tertiary, --error, --warning, --success, --accent-muted. - Zero raw hex values remain in admin.css. - Removed the corrupted/dead CSS from the bottom half and reconstructed all selectors from what the templates actually use (audited via grep). - Fixed structural issues: broken border shorthand, nested rules that were not valid CSS, orphaned declaration blocks. - New/restored rules: .admin-maintenance-bar (was corrupted), .status-access variants (was corrupted), .admin-section-title--danger, .admin-danger-zone, .admin-account-status (all reconstructed cleanly). - .admin-btn--warning and .admin-btn--danger now use var(--accent-yellow) and var(--accent-red) instead of hardcoded dark hex values. - .admin-btn-remove hover now uses var(--error) instead of #e55. - .admin-btn-unpublish now uses var(--bg-secondary)/var(--text-tertiary) instead of hardcoded grey hex values. - select option background colours removed (browser chrome, not styleable cross-platform). Templates: replace 4 inline var(--admin-text-muted) with var(--text-secondary) in index.php, thanks.php, import.php.
4.8 KiB
4.8 KiB
CSS & Semantic HTML Refactor
CSS class audit: replace with semantic selectors (admin.css / main.css / tfe.css / search.css)
admin.css: Replace.admin-mainwith.admin-body mainadmin.css: Replace.admin-page-titlewith.admin-body main > h1admin.css: Replace.admin-alert/.admin-alert--error/.admin-alert--successwith[role="alert"]/data-type="error|success"attributeadmin.css: Replace.admin-form-rowwith.admin-body form > divor CSS grid on<form>childrenadmin.css: Replace.admin-labelwith.admin-body form labeladmin.css: Replace.admin-input/.admin-select/.admin-textareawith native element selectorsadmin.css: Replace.admin-hintwith.admin-body form smalladmin.css: Replace.admin-tablewith.admin-body tableadmin.css: Replace.admin-fieldset/.admin-fieldset-legendwith.admin-body fieldset/.admin-body legendmain.css: Replace.card__captionwith.home-body .cards-container li porli > a > pmain.css: Replace.card__mediawith.home-body figuretfe.css: Replace.tfe-meta-listselectors witharticle dl,article dt,article ddtfe.css: Replace.tfe-media-blockwithaside figuretfe.css: Replace.tfe-file-captionwithaside figcaptionsearch.css: Replace.repertoire-col > h2— use.repertoire-index section > h2system.php: Move inline<style>block tosystem.css
Template HTML changes to match
- In all admin templates, replace
<p class="admin-hint">with<small>elements - In
tfe.php, removeclass="tfe-meta-list"— target viaarticle dl - In
tfe.php, removeclass="tfe-media-block"— target viaaside figure - In
tfe.php, removeclass="tfe-file-caption"— target viaaside figcaption - In
index.php, removeclass="card__caption"— target viali > a > p
Scattered inline styles in templates
tfe.phpline 146:style="align-items:start;"→.tfe-meta-item--topintfe.csstfe.phplines 148, 170-172, 193:font-style:italic,margin-top:1.5rem,font-size:.88rem;color:#666,color:#999;font-style:italic→.tfe-note-value,.tfe-back-link,.tfe-restrictedintfe.cssadmin/edit.php: multiplestyle=on.admin-form-rowand banner preview → modifier classes inadmin.css
Admin semantic HTML (sections IX–XVI)
add.php/edit.php: Replace<div class="admin-form-row">with CSS grid on<form>children (~20 divs in add.php, ~22 in edit.php)add.php/edit.php: Replace inner wrapper<div>in multi-control rows — use<small>for hints, remove the wrapper divadd.php/edit.php: Replace<div class="admin-checkbox-list">with<ul>; each<label class="admin-checkbox-label">becomes<li>containing<label>add.php/edit.php: Replace<div class="admin-submit-wrap">— remove; apply styles directly toform > button:last-childadd.php/edit.php: Replace<div class="admin-alert admin-alert--error/--success">with<p role="alert">/<p role="status">index.php: Replace<div class="admin-stats">/<div class="admin-stat">children with<dl>/<dt>/<dd>index.php: Replace<div class="admin-maintenance-bar">with<aside role="status">or<p role="status">index.php: Addrole="toolbar" aria-label="Actions groupées"to<div class="admin-bulk-actions">index.php: Addscope="col"to all<th>cells in the admin tableindex.php: Add non-colour indicator +aria-label="Statut : …"to status badge<span>elementstags.php: Addscope="col"to<th>cellstags.php: Move inlinestyle="margin-top:.35rem;"on forms →.admin-inline-form + .admin-inline-formselectorthanks.php: Replace<div class="admin-thesis-info">with<section>+<h2>heading; CSS targetsmain > sectionaccount.php: Replace<div class="admin-account-status">with<dl>;__row→<div>,__label→<dt>account.php: Replace<div class="admin-danger-zone__description">with<p>account.php: Movestyle="margin-top:3rem;"on danger zone heading → CSS modifier classlogin.php: Wrap login content in<main>(currently no main landmark)login.php: Extract inline styles on.admin-form-rowand.admin-submit-wrap→.admin-form-row--compactmodifier inadmin.css
Favicon
admin_favicon.svgused as public-facing favicon — rename or create a distinctfavicon.svgso admin and public can diverge without naming confusion