Rename nav.php to side-panel.php to host both navigation and table of contents views. The panel uses data-view attributes to switch between nav and toc content. Footer buttons updated to target the unified panel. TOC button now visible on desktop. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
No EOL
635 B
PHP
17 lines
No EOL
635 B
PHP
<nav class="toc">
|
|
<div class="light toc_label">sommaire</div>
|
|
<ul>
|
|
<?php foreach ($page->tocItems() as $item): ?>
|
|
<li>
|
|
<a href="#<?= $item['slug'] ?>"><?= $item['title'] ?></a>
|
|
<?php if (!empty($item['children'])): ?>
|
|
<ul>
|
|
<?php foreach ($item['children'] as $child): ?>
|
|
<li><a href="#<?= $child['slug'] ?>"><?= $child['title'] ?></a></li>
|
|
<?php endforeach ?>
|
|
</ul>
|
|
<?php endif ?>
|
|
</li>
|
|
<?php endforeach ?>
|
|
</ul>
|
|
</nav>
|