mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Replace apropos/licence/charte sticky nav with responsive details/summary TOC
- Convert .apropos-toc <nav> to <details class="toc" open> in all three templates - Add caret-down icon to summary (visible only on mobile via media queries) - Desktop (≥768px): sticky sidebar via CSS grid, force-open via pointer-events:none, hide caret - Mobile (≤767px): single column, collapsible TOC with rotating caret, margin-top below search bar - Rename .apropos-toc-link to .toc-sidebar-link - Merge 900px and 600px breakpoints into single 600px mobile media query - Rename apropos.css → content-page.css; update 3 controller references
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<main class="page-content" id="main-content">
|
||||
|
||||
<!-- LEFT: sticky table of contents -->
|
||||
<!-- Table of contents: collapsible on mobile, force-open on desktop -->
|
||||
<?php if (!empty($tocItems)): ?>
|
||||
<nav class="apropos-toc" aria-label="Sections de la page">
|
||||
<p class="apropos-toc-label">PARTIES</p>
|
||||
<details class="toc" open>
|
||||
<summary><?= icon('caret-down', 0, 'toc-caret') ?> PARTIES</summary>
|
||||
<ul>
|
||||
<?php foreach ($tocItems as $item): ?>
|
||||
<li><a href="<?= htmlspecialchars($item['href']) ?>"><?= htmlspecialchars($item['label']) ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
</details>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="content">
|
||||
|
||||
Reference in New Issue
Block a user