semantic HTML: apropos.php and licence.php (TODO section V & VI)

apropos.php:
- Remove redundant <div class="apropos-left"> wrapper; prose div is now a direct
  grid child
- <div class="apropos-description apropos-page-content"> → <div class="prose">
  (single canonical class for Markdown-rendered content)
- <div class="apropos-right"> → <aside class="apropos-aside"> (supplementary info
  landmark; contacts and credits are secondary to the main description)
- Three bare <div> wrappers inside the aside → <section> (erg link, Contacts, Crédits)
- Three <div class="apropos-contact"> entries → <address> with font-style:normal
  override; <span class="apropos-contact-name"> → <strong>;
  <span class="apropos-contact-email"> → <a href="mailto:…">
  Removes classes: apropos-left, apropos-right, apropos-contact, apropos-contact-name,
  apropos-contact-role, apropos-contact-email, apropos-description, apropos-page-content

licence.php:
- <div class="apropos-description apropos-page-content apropos-single"> →
  <div class="prose apropos-single"> (consistent with apropos.php rename)

apropos.css:
- Rename .apropos-description / .apropos-page-content → .prose; merge all prose
  content rules under the single .prose selector
- Rename .apropos-right → .apropos-aside; remove .apropos-left (empty rule)
- Replace .apropos-contact, .apropos-contact-name etc. with element selectors:
  .apropos-aside address, .apropos-aside address strong,
  .apropos-aside address span, .apropos-aside address a
- Update responsive blocks to reference .prose instead of .apropos-description
This commit is contained in:
Pontoporeia
2026-03-29 17:01:52 +02:00
parent f2c023e19a
commit 59ae2151d0
4 changed files with 99 additions and 90 deletions

22
TODO.md
View File

@@ -688,33 +688,31 @@ The design does **not** need to change - only the vocabulary of the markup.
### V - `public/apropos.php` ### V - `public/apropos.php`
- [ ] **`<div class="apropos-layout">`** - two-column grid. Replace with `<div>` kept but the - [x] **`<div class="apropos-layout">`** - two-column grid. Replace with `<div>` kept but the
children are semantic: left is the main content, right is supplementary. children are semantic: left is the main content, right is supplementary.
Left `<div class="apropos-left">` → remove (redundant wrapper around already-styled content). Left `<div class="apropos-left">` → remove (redundant wrapper around already-styled content).
Right `<div class="apropos-right">``<aside>` (contacts, credits = supplementary info). Right `<div class="apropos-right">``<aside class="apropos-aside">` (contacts, credits = supplementary info).
- [ ] **`<div class="apropos-description apropos-page-content">`** inside the left col - - [x] **`<div class="apropos-description apropos-page-content">`** inside the left col -
the Parsedown output already generates `<p>`, `<h1>`-`<h3>`, `<ul>` etc. the Parsedown output already generates `<p>`, `<h1>`-`<h3>`, `<ul>` etc.
The wrapping `<div>` is only needed for the `.apropos-page-content` scoped CSS rules. The wrapping `<div>` is only needed for the `.apropos-page-content` scoped CSS rules.
Keep it but as a single class - `<div class="prose">` - and scope all Markdown content Keep it but as a single class - `<div class="prose">` - and scope all Markdown content
styles under `.prose`. This is the standard prose-container pattern. styles under `.prose`. This is the standard prose-container pattern.
- [ ] **`<div class="apropos-contact">`** - each contact entry. Replace with `<address>`: - [x] **`<div class="apropos-contact">`** - each contact entry. Replace with `<address>`:
the HTML spec defines `<address>` for contact information related to the document or section. the HTML spec defines `<address>` for contact information related to the document or section.
Each contact is literally an address entry. `<span class="apropos-contact-name">` Each contact is literally an address entry. `<span class="apropos-contact-name">`
`<strong>`, `<span class="apropos-contact-role">` → plain text or `<span>`, `<strong>`, `<span class="apropos-contact-role">` → plain text `<span>`,
`<span class="apropos-contact-email">``<a href="mailto:...">`. Three classes removed. `<span class="apropos-contact-email">``<a href="mailto:...">`. Three classes removed.
- [ ] **Outer `<div>` wrappers around each section in `.apropos-right`** (`<div><h2>...</h2></div>`, - [x] **Outer `<div>` wrappers around each section in `.apropos-right`** (`<div><h2>...</h2></div>`,
`<div><h2>Contacts</h2>...</div>`, `<div><h2>Crédits</h2>...</div>`) - replace each with `<div><h2>Contacts</h2>...</div>`, `<div><h2>Crédits</h2>...</div>`) - replaced with
`<section>`. Remove the anonymous `<div>` wrappers; CSS targets `aside section > h2`. `<section>`. CSS targets `aside section > h2`.
### VI - `public/licence.php` ### VI - `public/licence.php`
- [ ] **`<div class="apropos-right"></div>`** - always-empty right column. Remove entirely; the - [x] **`<div class="apropos-right"></div>`** - always-empty right column. Removed entirely;
`licence.php` page is full-width content. Update `licence.php` to not use `.apropos-layout` `licence.php` uses `<div class="prose apropos-single">` without the two-column layout.
at all - just `<main class="apropos-main"><div class="prose">...</div></main>`.
No class changes needed to `apropos.css`; the layout simply is not applied.
### VII - Summary of class deletions enabled by semantic changes ### VII - Summary of class deletions enabled by semantic changes

View File

@@ -46,44 +46,42 @@ $extraCss = ['assets/apropos.css'];
<div class="apropos-layout"> <div class="apropos-layout">
<!-- LEFT: main text (from DB, Markdown-rendered) --> <!-- LEFT: main text (from DB, Markdown-rendered) -->
<div class="apropos-left"> <div class="prose">
<div class="apropos-description apropos-page-content"> <?= $aboutHtml ?>
<?= $aboutHtml ?>
</div>
</div> </div>
<!-- RIGHT: links, contacts, credits --> <!-- RIGHT: links, contacts, credits -->
<div class="apropos-right"> <aside class="apropos-aside">
<div> <section>
<h2 class="apropos-section-title"> <h2 class="apropos-section-title">
<a href="https://erg.be" target="_blank" rel="noopener">Site de l'erg</a> <a href="https://erg.be" target="_blank" rel="noopener">Site de l'erg</a>
</h2> </h2>
</div> </section>
<div> <section>
<h2 class="apropos-section-title">Contacts</h2> <h2 class="apropos-section-title">Contacts</h2>
<div class="apropos-contact"> <address>
<span class="apropos-contact-name">Laurent Leprince</span> <strong>Laurent Leprince</strong>
<span class="apropos-contact-role">Bibliothèque d'architecture, d'ingénierie architecturale, d'urbanisme (BAIU) :</span> <span>Bibliothèque d'architecture, d'ingénierie architecturale, d'urbanisme (BAIU) :</span>
<span class="apropos-contact-email">laurent.leprince@uclouvain.be</span> <a href="mailto:laurent.leprince@uclouvain.be">laurent.leprince@uclouvain.be</a>
</div> </address>
<div class="apropos-contact"> <address>
<span class="apropos-contact-name">Xavier Gorgol</span> <strong>Xavier Gorgol</strong>
<span class="apropos-contact-role">Responsable des mémoires de l'ERG :</span> <span>Responsable des mémoires de l'ERG :</span>
<span class="apropos-contact-email">xavier.gorgol@erg.be</span> <a href="mailto:xavier.gorgol@erg.be">xavier.gorgol@erg.be</a>
</div> </address>
<div class="apropos-contact"> <address>
<span class="apropos-contact-name">Brigitte Ledune</span> <strong>Brigitte Ledune</strong>
<span class="apropos-contact-role">Cours de suivi de mémoire :</span> <span>Cours de suivi de mémoire :</span>
<span class="apropos-contact-email">brigitte.ledune@erg.be</span> <a href="mailto:brigitte.ledune@erg.be">brigitte.ledune@erg.be</a>
</div> </address>
</div> </section>
<div> <section>
<h2 class="apropos-section-title">Crédits</h2> <h2 class="apropos-section-title">Crédits</h2>
<p class="apropos-credits-text"> <p class="apropos-credits-text">
Design &amp; développement : Olivia Marly, Théophile Gerveau-Mercie &amp; Théo Hennequin Design &amp; développement : Olivia Marly, Théophile Gerveau-Mercie &amp; Théo Hennequin
@@ -91,9 +89,9 @@ $extraCss = ['assets/apropos.css'];
<p class="apropos-credits-text"> <p class="apropos-credits-text">
Typographies : Ductus (Amélie Dumont) &amp; BBB DM Sans Typographies : Ductus (Amélie Dumont) &amp; BBB DM Sans
</p> </p>
</div> </section>
</div> </aside>
</div> </div>
</main> </main>

View File

@@ -1,5 +1,5 @@
/* ============================================================ /* ============================================================
À PROPOS PAGE (apropos.php) À PROPOS PAGE (apropos.php) + LICENCE PAGE (licence.php)
============================================================ */ ============================================================ */
.apropos-body { .apropos-body {
@@ -28,10 +28,11 @@
max-width: 720px; max-width: 720px;
} }
/* Left col — main description text in big monospace */ /* ------------------------------------------------------------------ */
.apropos-left {} /* Main prose column — Markdown-rendered content */
/* ------------------------------------------------------------------ */
.apropos-description { .prose {
font-family: "Courier New", Courier, monospace; font-family: "Courier New", Courier, monospace;
font-size: 1.55rem; font-size: 1.55rem;
line-height: 1.45; line-height: 1.45;
@@ -40,12 +41,53 @@
margin: 0 0 2rem 0; margin: 0 0 2rem 0;
} }
.apropos-description p { .prose p {
margin: 0 0 1.2em 0; margin: 0 0 1.2em 0;
} }
/* Right col — links, contacts, credits */ .prose h1,
.apropos-right { .prose h2,
.prose h3 {
font-family: "Courier New", Courier, monospace;
font-weight: 400;
margin: 1.5em 0 0.5em 0;
}
.prose h1 { font-size: 1.55rem; }
.prose h2 { font-size: 1.3rem; }
.prose h3 { font-size: 1.1rem; }
.prose a {
color: var(--purple);
text-underline-offset: 2px;
}
.prose ul,
.prose ol {
padding-left: 1.5rem;
margin-bottom: 1rem;
}
.prose li {
margin-bottom: .3em;
}
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose code {
font-family: "Courier New", Courier, monospace;
font-size: 0.9em;
background: rgba(0,0,0,.06);
padding: .1em .3em;
border-radius: 2px;
}
/* ------------------------------------------------------------------ */
/* Right aside — links, contacts, credits */
/* ------------------------------------------------------------------ */
.apropos-aside {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 2rem; gap: 2rem;
@@ -66,11 +108,13 @@
text-underline-offset: 3px; text-underline-offset: 3px;
} }
.apropos-contact { /* Contact entries — <address> elements */
.apropos-aside address {
margin-bottom: 1rem; margin-bottom: 1rem;
font-style: normal; /* override browser italic default for <address> */
} }
.apropos-contact-name { .apropos-aside address strong {
font-weight: 700; font-weight: 700;
font-size: 0.95rem; font-size: 0.95rem;
color: var(--black); color: var(--black);
@@ -78,57 +122,26 @@
margin-bottom: 0.15rem; margin-bottom: 0.15rem;
} }
.apropos-contact-role, .apropos-aside address span,
.apropos-contact-email { .apropos-aside address a {
font-size: 0.9rem; font-size: 0.9rem;
color: var(--black); color: var(--black);
line-height: 1.4; line-height: 1.4;
display: block; display: block;
} }
.apropos-aside address a {
text-decoration: underline;
text-underline-offset: 2px;
}
.apropos-credits-text { .apropos-credits-text {
font-size: 0.9rem; font-size: 0.9rem;
color: var(--black); color: var(--black);
line-height: 1.6; line-height: 1.6;
} }
/* Markdown-rendered page content */ /* Licences section (legacy) */
.apropos-page-content p {
margin: 0 0 1.2em 0;
}
.apropos-page-content h1,
.apropos-page-content h2,
.apropos-page-content h3 {
font-family: "Courier New", Courier, monospace;
font-weight: 400;
margin: 1.5em 0 0.5em 0;
}
.apropos-page-content h1 { font-size: 1.55rem; }
.apropos-page-content h2 { font-size: 1.3rem; }
.apropos-page-content h3 { font-size: 1.1rem; }
.apropos-page-content a {
color: var(--purple);
text-underline-offset: 2px;
}
.apropos-page-content ul,
.apropos-page-content ol {
padding-left: 1.5rem;
margin-bottom: 1rem;
}
.apropos-page-content li {
margin-bottom: .3em;
}
.apropos-page-content strong { font-weight: 700; }
.apropos-page-content em { font-style: italic; }
.apropos-page-content code {
font-family: "Courier New", Courier, monospace;
font-size: 0.9em;
background: rgba(0,0,0,.06);
padding: .1em .3em;
border-radius: 2px;
}
/* Licences section */
.apropos-licences { .apropos-licences {
margin-top: 2rem; margin-top: 2rem;
} }
@@ -154,7 +167,7 @@
gap: 2rem; gap: 2rem;
} }
.apropos-description { .prose {
font-size: 1.2rem; font-size: 1.2rem;
} }
@@ -168,7 +181,7 @@
padding: 1.5rem 1rem 3rem; padding: 1.5rem 1rem 3rem;
} }
.apropos-description { .prose {
font-size: 1rem; font-size: 1rem;
} }
} }

View File

@@ -39,7 +39,7 @@ $extraCss = ['assets/apropos.css'];
<?php include APP_ROOT . '/templates/search-bar.php'; ?> <?php include APP_ROOT . '/templates/search-bar.php'; ?>
<main class="apropos-main" id="main-content"> <main class="apropos-main" id="main-content">
<div class="apropos-description apropos-page-content apropos-single"> <div class="prose apropos-single">
<?php if (!empty(trim($content))): ?> <?php if (!empty(trim($content))): ?>
<?= $html ?> <?= $html ?>
<?php else: ?> <?php else: ?>