49 lines
No EOL
1.5 KiB
PHP
49 lines
No EOL
1.5 KiB
PHP
<?php snippet('header'); ?>
|
|
|
|
<main id="<?= $page->template() ?>">
|
|
<article>
|
|
<?php snippet('cover', slots: true) ?>
|
|
<?php slot('title') ?>
|
|
<h1 class="main-title <?= setTitleFontSizeClass($page->title()) ?>"><?= $page->title() ?></h1>
|
|
<p class="opacity" style="--opacity:.6">catégorie</p>
|
|
<?php endslot() ?>
|
|
<?php endsnippet() ?>
|
|
<div
|
|
class="active-tab"
|
|
>
|
|
<ul>
|
|
<?php foreach($kirby->collection('years') as $year): ?>
|
|
<?php if ($year) : ?>
|
|
<?php endif ?>
|
|
<div
|
|
x-data='{
|
|
isOpen: false
|
|
}'
|
|
:class="isOpen ? '' : 'short'"
|
|
class="
|
|
texts__year
|
|
| full-width
|
|
flex column
|
|
bottom"
|
|
style="
|
|
--content: center;
|
|
--bottom: 2;"
|
|
>
|
|
<h3 class="fs-xl color" style="--color:var(--color-secondary)"><?= $year->title() ?></h3>
|
|
<div class="year__edito">
|
|
<?= $year->edito() ?>
|
|
</div>
|
|
<button
|
|
:class="isOpen ? 'open' : 'close'"
|
|
class="see-more toggle left" @click="isOpen = !isOpen">Lire</button>
|
|
</div>
|
|
<?php foreach($year->children() as $article): ?>
|
|
<?php if ($article->category() == $page->title()) : ?>
|
|
<?php snippet('text-item', ['article' => $article]) ?>
|
|
<?php endif ?>
|
|
<?php endforeach ?>
|
|
<?php endforeach ?>
|
|
</ul>
|
|
</div>
|
|
</article>
|
|
</main>
|