j'avais oublié : header.php, linear.php, grid.php pour l'implémentation du allYears(). Peut-etr que ça vaudrait le coup de refactorisé tout ça parceque ça fait beaucoup de duplication

This commit is contained in:
antonin gallon 2026-02-09 22:44:13 +01:00
parent d4b7a3f3fb
commit 3f5595144d
3 changed files with 11 additions and 8 deletions

View file

@ -12,9 +12,11 @@
href="/auteurs/<?= Str::slug($page->author()->toPage()->title()) ?>"><?= $page->author()->toPage()->title() ?></a><br>
<span class="light">publié le
</span><?= $page->published()->toDate('d/m/Y') ?><br>
<span class="light">dans</span> <a
href="<?= $page->parent()->url() ?>"><?= $page->parent()->title() ?></a>
/ <a
<span class="light">dans</span>
<?php foreach(allYears($page) as $year): ?>
<a href="<?= $year->url() ?>"><?= $year->title() ?></a> /
<?php endforeach ?>
<a
href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a>
</p>
<?php endslot() ?>