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

@@ -1198,7 +1198,6 @@ th.admin-ap-col {
.admin-import-log {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-3xs);
@@ -2158,18 +2157,23 @@ th.admin-ap-col {
100% { transform: scaleX(0); transform-origin: right; }
}
/* ── Sidebar TOC ───────────────────────────────────────────────────────────── */
/* ── Sidebar TOC (matches public .page-content alignment pattern) ────────── */
.admin-main--toc {
display: flex;
gap: var(--space-xs);
align-items: flex-start;
gap: var(--space-2xl);
align-items: start;
padding: var(--space-xl) var(--space-m) var(--space-2xl);
}
.admin-main--toc > article {
flex: 1;
min-width: 0;
padding-top: var(--space-m);
}
/* Align first child of article with TOC heading (same as public) */
.admin-main--toc > article > :first-child {
margin-top: 2.2rem;
}
.admin-main--toc > article > section {
@@ -2180,41 +2184,14 @@ th.admin-ap-col {
margin-bottom: var(--space-m);
}
.admin-toc {
position: sticky;
top: var(--space-xs);
width: 160px;
/* Admin TOC: same <details class="toc"> as public pages, positioned sticky */
#admin-toc {
width: 180px;
flex-shrink: 0;
padding-top: var(--space-m);
}
.admin-toc-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.admin-toc-list a {
display: block;
padding: var(--space-3xs) var(--space-2xs);
font-size: var(--step--2);
color: var(--text-secondary);
text-decoration: none;
border-left: 2px solid transparent;
transition: color 0.15s, border-color 0.15s;
}
.admin-toc-list a:hover {
color: var(--text-primary);
}
.admin-toc-list a.admin-toc-active {
color: var(--text-primary);
font-weight: 600;
border-left-color: var(--accent, var(--color-primary));
#admin-toc .toc-list a {
font-size: var(--step--1);
}
/* ── Lazy-load transition ─────────────────────────────────────────────────── */

View File

@@ -39,7 +39,6 @@ html, body {
body {
font-family: var(--font-body);
font-weight: 300;
background: var(--bg-primary);
color: var(--text-primary);
background: linear-gradient(
180deg,

View File

@@ -8,7 +8,6 @@
header {
vertical-align: center;
flex-shrink: 0;
background: #c05de1;
background: linear-gradient(
0deg,
rgba(192, 93, 225, 1) 0%,

View File

@@ -21,7 +21,6 @@ form[role="search"]:not(.header-search-form) {
.header-search-wrap {
padding: 0;
flex-shrink: 0;
background: #C05DE1;
background: linear-gradient(180deg, rgba(192, 93, 225, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

View File

@@ -0,0 +1,141 @@
/* ============================================================
SHARED TOC — sidebar table-of-contents for admin + public pages.
Both use <details class="toc"> markup.
Public: server-rendered links (about, charte, licence)
Admin: JS-populated links (contenus, accès, paramètres — admin-toc.js)
============================================================ */
/* ── Shared list styles (.toc-list) ─────────────────────────────────────── */
.toc-list,
.toc ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-3xs);
}
.toc-list a,
.toc ul a {
display: block;
font-family: var(--font-body);
font-size: var(--step-0);
font-weight: 300;
color: var(--text-primary);
text-decoration: none;
padding: var(--space-3xs) 0;
transition: color 0.15s;
}
.toc-list a:hover {
color: var(--accent-primary);
}
.toc-list a.toc-active,
.toc ul a.toc-active {
color: var(--accent-primary);
font-weight: 400;
}
/* ── Public TOC (details/summary block) ─────────────────────────────────── */
.toc {
border: none;
border-radius: 0;
background: transparent;
overflow: visible;
}
.toc[open] {
padding-bottom: 0;
}
.toc > :not(summary) {
padding-left: 0;
padding-right: 0;
}
.toc summary {
font-family: var(--font-display);
font-size: var(--step-1);
font-weight: 400;
color: var(--text-primary);
padding: 0 0 var(--space-2xs) 0;
border-bottom: 1px solid var(--text-primary);
display: flex;
align-items: center;
gap: var(--space-2xs);
background: transparent;
cursor: pointer;
list-style: none;
}
.toc summary::-webkit-details-marker {
display: none;
}
.toc summary:hover {
color: inherit;
background: transparent;
}
/* Caret icon inside summary — visible only on mobile */
.toc-caret {
flex-shrink: 0;
transition: transform 0.2s ease;
}
.toc[open] > summary .toc-caret {
transform: rotate(180deg);
}
/* Sidebar links (about page — custom links below TOC) */
.toc-sidebar-link:first-of-type {
padding-top: var(--space-s);
border-top: 1px solid var(--border-primary);
}
.toc-sidebar-link + .toc-sidebar-link {
padding-top: var(--space-xs);
}
.toc-sidebar-link a {
font-size: var(--step--2);
color: var(--accent-primary);
text-decoration: none;
transition: opacity 0.15s;
}
.toc-sidebar-link a:hover {
opacity: 0.8;
}
/* ── Desktop: sticky sidebar ───────────────────────────────────────────── */
@media (min-width: 768px) {
.toc {
position: sticky;
top: var(--space-l);
grid-column: 1;
}
.toc summary {
pointer-events: none;
}
.toc-caret {
display: none;
}
}
/* ── Mobile: collapsible TOC ────────────────────────────────────────────── */
@media (max-width: 767px) {
.toc {
position: static;
grid-column: 1;
}
.toc summary {
cursor: pointer;
list-style: revert;
}
}

View File

@@ -21,142 +21,17 @@
align-items: start;
}
/* ------------------------------------------------------------------ */
/* Table of contents — details/summary block */
/* ------------------------------------------------------------------ */
.toc {
border: none;
border-radius: 0;
background: transparent;
overflow: visible;
}
.toc[open] {
padding-bottom: 0;
}
.toc > :not(summary) {
padding-left: 0;
padding-right: 0;
}
.toc summary {
font-family: var(--font-display);
font-size: var(--step-1);
font-weight: 400;
color: var(--text-primary);
padding: 0 0 var(--space-2xs) 0;
border-bottom: 1px solid var(--text-primary);
display: flex;
align-items: center;
gap: var(--space-2xs);
background: transparent;
cursor: pointer;
list-style: none;
}
.toc summary::-webkit-details-marker {
display: none;
}
.toc summary:hover {
color: inherit;
background: transparent;
}
/* Caret icon inside summary — visible only on mobile */
.toc-caret {
flex-shrink: 0;
transition: transform 0.2s ease;
}
.toc[open] > summary .toc-caret {
transform: rotate(180deg);
}
.toc ul {
list-style: none;
margin: var(--space-xs) 0 0 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-3xs);
}
.toc ul a {
font-family: var(--font-body);
font-size: var(--step-0);
font-weight: 300;
color: var(--text-primary);
text-decoration: none;
display: block;
padding: var(--space-3xs) 0;
transition: color 0.15s;
}
.toc ul a:hover {
color: var(--accent-primary);
}
/* Sidebar links (about page) */
.toc-sidebar-link:first-of-type {
padding-top: var(--space-s);
border-top: 1px solid var(--border-primary);
}
.toc-sidebar-link + .toc-sidebar-link {
padding-top: var(--space-xs);
}
.toc-sidebar-link a {
font-size: var(--step--2);
color: var(--accent-primary);
text-decoration: none;
transition: opacity 0.15s;
}
.toc-sidebar-link a:hover {
color: var(--accent-primary);
opacity: 1;
}
/* ------------------------------------------------------------------ */
/* Desktop: force-open TOC, hide caret, sticky sidebar */
/* ------------------------------------------------------------------ */
/* ── TOC styles → components/toc.css (shared with admin) ───────────────── */
/* Grid column positioning for content pages with sidebar TOC */
@media (min-width: 768px) {
.toc {
position: sticky;
top: var(--space-l);
grid-column: 1;
}
.toc summary {
pointer-events: none;
list-style: none;
}
.toc summary::-webkit-details-marker {
display: none;
}
.toc-caret {
display: none;
}
.page-content > .content,
.page-content > .content-section {
.page-content > article {
grid-column: 2;
min-width: 0;
max-width: 100%;
}
}
/* ------------------------------------------------------------------ */
/* Mobile: collapsible TOC */
/* ------------------------------------------------------------------ */
@media (max-width: 767px) {
.page-content {
grid-template-columns: 1fr;
@@ -164,30 +39,25 @@
padding: var(--space-m) var(--space-s) var(--space-xl);
}
.page-content > article {
grid-column: 1;
}
.toc {
margin-top: var(--space-s);
position: static;
grid-column: 1;
}
.page-content > .content,
.page-content > .content-section {
grid-column: 1;
}
.toc summary {
cursor: pointer;
list-style: revert;
}
}
/* ── First content child aligns with TOC heading top ───────────────────── */
.page-content > article > :first-child {
margin-top: 2.2rem;
}
/* ------------------------------------------------------------------ */
/* Main content area */
/* Article content typography */
/* ------------------------------------------------------------------ */
/* Shared typography for about-page sections and charte/licence content */
.content,
.content-section {
.page-content > article {
display: block;
max-width: 100%;
font-family: var(--font-body);
@@ -195,77 +65,57 @@
line-height: 1.6;
color: var(--text-primary);
font-weight: 300;
padding-bottom: var(--space-xl);
}
.content *,
.content-section * {
.page-content > article * {
max-width: 100%;
overflow-wrap: anywhere;
word-break: break-word;
}
.content {
padding-bottom: var(--space-xl);
}
.content p,
.content-section p {
.page-content > article p {
margin: 0 0 1em 0;
}
.content p:last-child,
.content-section p:last-child {
.page-content > article p:last-child {
margin-bottom: 0;
}
.content :where(h1, h2, h3),
.content-section :where(h1, h2, h3) {
.page-content > article :where(h1, h2, h3) {
margin: 1.5em 0 0.5em 0;
}
.content :where(h1, h2, h3):first-child,
.content-section :where(h1, h2, h3):first-child {
margin-top: 2.2rem;
}
.content a,
.content-section a {
.page-content > article a {
color: inherit;
text-decoration: none;
font-weight: 700;
}
.content a:hover,
.content-section a:hover {
.page-content > article a:hover {
color: var(--accent-primary);
text-decoration: none;
}
.content ul,
.content ol,
.content-section ul,
.content-section ol {
.page-content > article ul,
.page-content > article ol {
padding-left: var(--space-m);
margin-bottom: var(--space-s);
}
.content li,
.content-section li {
.page-content > article li {
margin-bottom: 0.3em;
}
.content strong,
.content-section strong {
.page-content > article strong {
font-weight: 700;
}
.content em,
.content-section em {
.page-content > article em {
font-style: italic;
}
.content :where(pre, pre code, code),
.content-section :where(pre, pre code, code) {
.page-content > article :where(pre, pre code, code) {
display: block;
max-width: 100%;
overflow-x: auto;
@@ -288,19 +138,29 @@
max-width: 100%;
}
/* Section separators (about page only — .content-section adds dividers) */
.page-content > .content-section {
/* Section separators (about page only) */
.page-content > article > section {
padding-bottom: var(--space-xl);
border-bottom: 1px solid var(--border-primary);
margin-bottom: var(--space-xl);
}
.page-content > .content-section:last-child {
.page-content > article > section:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: var(--space-xl);
}
/* Scroll margin so anchor links account for the sticky header */
.page-content > article :where(h1, h2, h3) {
scroll-margin-top: var(--space-l);
}
/* Hide CommonMark heading permalink anchors */
.heading-permalink {
display: none;
}
/* ------------------------------------------------------------------ */
/* Section titles */
/* ------------------------------------------------------------------ */
@@ -314,17 +174,6 @@
line-height: 1.1;
}
/* Scroll margin so anchor links account for the sticky header */
.content :where(h1, h2, h3),
.content-section :where(h1, h2, h3) {
scroll-margin-top: var(--space-l);
}
/* Hide CommonMark heading permalink anchors (id now lives on the heading itself) */
.heading-permalink {
display: none;
}
/* ------------------------------------------------------------------ */
/* Contacts grid */
/* ------------------------------------------------------------------ */
@@ -431,7 +280,7 @@
padding: var(--space-m) var(--space-s) var(--space-xl);
}
.content-section {
.page-content > article {
font-size: var(--step-0);
}

View File

@@ -23,5 +23,6 @@
@import "components/pagination.css";
@import "components/header.css";
@import "components/search.css";
@import "components/toc.css";
@import "utilities.css";