adjust styles
This commit is contained in:
parent
dd217e7a6a
commit
3804d13cb6
34 changed files with 756 additions and 174 deletions
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
$left['slug'] = Str::slug($left['label']);
|
||||
$left = $left ?? false;
|
||||
|
||||
if ($left) {
|
||||
$left['slug'] = Str::slug($left['label']);
|
||||
}
|
||||
$authorFilter = isset($authorFilter) ? $authorFilter : false;
|
||||
$activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
||||
?>
|
||||
|
|
@ -11,11 +15,13 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<div class="toggle-btns | flex space-between" style="
|
||||
--content:space-between;
|
||||
">
|
||||
<button
|
||||
class="toggle left"
|
||||
:class="activeTab === '<?=$left['slug'] ?>' ? 'open' : 'close'"
|
||||
@click="toggleTab($data, '<?=$left['slug'] ?>')"
|
||||
><?= $left['label'] ?></button>
|
||||
<?php if ($left): ?>
|
||||
<button
|
||||
class="toggle left"
|
||||
:class="activeTab === '<?=$left['slug'] ?>' ? 'open' : 'close'"
|
||||
@click="toggleTab($data, '<?=$left['slug'] ?>')"
|
||||
><?= $left['label'] ?></button>
|
||||
<?php endif ?>
|
||||
<button
|
||||
class="toggle right"
|
||||
:class="activeTab === 'texts' ? 'open' : 'close'"
|
||||
|
|
@ -26,10 +32,12 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
<div
|
||||
class="active-tab"
|
||||
>
|
||||
<section
|
||||
x-show="activeTab === '<?=$left['slug'] ?>'">
|
||||
<?= $left['content'] ?>
|
||||
</section>
|
||||
<?php if ($left): ?>
|
||||
<section
|
||||
x-show="activeTab === '<?=$left['slug'] ?>'">
|
||||
<?= $left['content'] ?>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
<ul
|
||||
x-show="activeTab === 'texts'">
|
||||
<?php foreach($kirby->collection('years') as $year): ?>
|
||||
|
|
@ -56,25 +64,13 @@ $activeTab = isset($activeTab) ? Str::slug($activeTab) : '';
|
|||
class="see-more toggle left" @click="isOpen = !isOpen">Lire</button>
|
||||
</div>
|
||||
<?php foreach($year->children() as $article): ?>
|
||||
<?php if (!$authorFilter || $authorFilter === $article->author()->toUser()->name()->value()) : ?>
|
||||
<li class="texts | bottom" style="--bottom:3">
|
||||
<a href="<?= $article->url() ?>" class="texts__title no-line">
|
||||
<h3><?= $article->title() ?></h3>
|
||||
</a>
|
||||
<div class="texts__infos">
|
||||
<p>
|
||||
<?php if (!$authorFilter): ?>
|
||||
<span class="opacity" style="--opacity:.5">par</span>
|
||||
<a class="author" href="/auteurs/<?= Str::slug($article->author()->toUser()->name()) ?>"><?= $article->author()->toUser()->name() ?></a>,
|
||||
<span class="opacity" style="--opacity:.5">le</span>
|
||||
<?php endif ?>
|
||||
<?= $article->published()->toDate('d/m/Y') ?>
|
||||
</p>
|
||||
</div>
|
||||
<!-- <div class="texts__labels">
|
||||
<button class="label label--category">[ <?= $article->category() ?> ]</button>
|
||||
</div> -->
|
||||
</li>
|
||||
<?php if (!$authorFilter || $authorFilter == $article->author()->toUser()->name()->value()) : ?>
|
||||
<?php snippet(
|
||||
'text-item',
|
||||
[
|
||||
'article' => $article
|
||||
]
|
||||
) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue