Fix biome lint errors: remove duplicate CSS properties, apply safe auto-fixes

CSS:
- Remove duplicate 'background' fallbacks in base.css, header.css, search.css
  (solid color declared before gradient — gradient always wins)
- Remove duplicate 'padding' in admin.css .admin-import-log

JS (biome --write safe fixes applied):
- function() → arrow functions in all IIFEs and callbacks
- forEach/callback → arrow functions
- evaluePtrn → parseInt(x, 10) in admin-contacts-form.js
- Cleaned label text in build.mjs lint step

Remaining warnings are intentional: !important overrides, descending
specificity (admin.css cascade), noUnusedVariables (functions exported
to window/onclick), useTemplate style preference.
This commit is contained in:
Pontoporeia
2026-06-24 13:21:04 +02:00
parent 82d3dcb084
commit 6ecd3d4540
31 changed files with 336 additions and 348 deletions

View File

@@ -2,12 +2,14 @@
/**
* admin-toc.php — sidebar table-of-contents for long admin pages.
*
* Rendered as an <aside> inside <main>, before the <article> content.
* Uses IntersectionObserver to highlight the active section.
* Uses the same <details class="toc"> markup as the public content pages
* (about, charte, licence). The link list is populated by admin-toc.js
* at runtime.
*/
?>
<aside id="admin-toc" class="admin-toc" aria-label="Sur cette page">
<nav class="admin-toc-list" id="admin-toc-list">
<!-- populated by JS (admin-toc.js, loaded via admin.min.js) -->
</nav>
</aside>
<details class="toc" id="admin-toc" open aria-label="Sur cette page">
<summary><?= icon('caret-down', 0, 'toc-caret') ?> SUR CETTE PAGE</summary>
<ul class="toc-list" id="admin-toc-list">
<!-- populated by admin-toc.js -->
</ul>
</details>

View File

@@ -36,7 +36,7 @@ function renderEntries(array $entries): string
<!-- Table of contents: collapsible on mobile, force-open on desktop -->
<details class="toc" open>
<summary><?= icon('caret-down', 0, 'toc-caret') ?> PARTIES</summary>
<ul>
<ul class="toc-list">
<li><a href="#apropos-intro">À propos</a></li>
<?php if (!empty($contacts)): ?>
<li><a href="#apropos-contacts">Contacts</a></li>
@@ -54,6 +54,7 @@ function renderEntries(array $entries): string
<?php endif; ?>
</details>
<article>
<!-- Intro text from DB -->
<section class="content-section" id="apropos-intro">
<?= $aboutHtml ?>
@@ -113,5 +114,6 @@ function renderEntries(array $entries): string
</div>
</dl>
</section>
</article>
</main>

View File

@@ -4,7 +4,7 @@
<?php if (!empty($tocItems)): ?>
<details class="toc" open>
<summary><?= icon('caret-down', 0, 'toc-caret') ?> PARTIES</summary>
<ul>
<ul class="toc-list">
<?php foreach ($tocItems as $item): ?>
<li><a href="<?= htmlspecialchars($item['href']) ?>"><?= htmlspecialchars($item['label']) ?></a></li>
<?php endforeach; ?>
@@ -12,12 +12,12 @@
</details>
<?php endif; ?>
<div class="content">
<article>
<?php if (!empty(trim($content))): ?>
<?= $html ?>
<?php else: ?>
<p>Contenu à venir.</p>
<?php endif; ?>
</div>
</article>
</main>

View File

@@ -4,7 +4,7 @@
<?php if (!empty($tocItems)): ?>
<details class="toc" open>
<summary><?= icon('caret-down', 0, 'toc-caret') ?> PARTIES</summary>
<ul>
<ul class="toc-list">
<?php foreach ($tocItems as $item): ?>
<li><a href="<?= htmlspecialchars($item['href']) ?>"><?= htmlspecialchars($item['label']) ?></a></li>
<?php endforeach; ?>
@@ -12,12 +12,12 @@
</details>
<?php endif; ?>
<div class="content">
<article>
<?php if (!empty(trim($content))): ?>
<?= $html ?>
<?php else: ?>
<p>Contenu à venir.</p>
<?php endif; ?>
</div>
</article>
</main>