set content un years panel. Styles problems

This commit is contained in:
isUnknown 2024-04-07 12:24:40 +02:00
parent 92625d2fb9
commit 76b98eb2e3
6 changed files with 130 additions and 18 deletions

View file

@ -1,4 +1,58 @@
<nav id="entries">
<button class="entry-btn entry-btn--left">années</button>
<button class="entry-btn entry-btn--right">categories</button>
</nav>
<div id="entry-btns">
<button
class="entry-btn entry-btn--left"
onclick="togglePanel('left')"
>années</button>
<button
class="entry-btn entry-btn--right"
onclick="togglePanel('right')"
>categories</button>
</div>
<nav class="panel panel--left">
<ul
x-show="activeTab === 'texts'">
<?php foreach($kirby->collection('years') as $year): ?>
<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 snippet(
'text-item',
[
'article' => $article
]
) ?>
<?php endforeach ?>
<?php endforeach ?>
</ul>
<button
onclick="togglePanel('left')"
class="panel-close">
</button>
</nav>
<nav
onclick="togglePanel('right')"
class="panel panel--right"></nav>