adjust styles
This commit is contained in:
parent
dd217e7a6a
commit
3804d13cb6
34 changed files with 756 additions and 174 deletions
49
site/templates/category.php
Normal file
49
site/templates/category.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue