add author page
This commit is contained in:
parent
2114fbbb8e
commit
f9397935bd
4 changed files with 26 additions and 18 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
$left['slug'] = Str::slug($left['label']);
|
||||
$authorFilter = isset($authorFilter) ? $authorFilter : false;
|
||||
?>
|
||||
|
||||
<div id="tabs" x-data="{
|
||||
|
|
@ -31,21 +32,26 @@ $left['slug'] = Str::slug($left['label']);
|
|||
<h3 class="fs-xl color" style="--color:var(--color-secondary)"><?= $year->title() ?></h3>
|
||||
</div>
|
||||
<?php foreach($year->children() as $article): ?>
|
||||
<li class="article | bottom" style="--bottom:3">
|
||||
<a href="<?= $article->url() ?>" class="article__title no-line">
|
||||
<h3><?= $article->title() ?></h3>
|
||||
</a>
|
||||
<div class="article__infos">
|
||||
<p>
|
||||
<span class="opacity" style="--opacity:.5">Par</span>
|
||||
<a class="author no-line" href="#"><?= $article->author()->toUser()->name() ?></a>,
|
||||
<span class="opacity" style="--opacity:.5">le</span> <?= $article->published()->toDate('d/m/Y') ?>
|
||||
</p>
|
||||
</div>
|
||||
<!-- <div class="article__labels">
|
||||
<button class="label label--category">[ <?= $article->category() ?> ]</button>
|
||||
</div> -->
|
||||
</li>
|
||||
<?php if (!$authorFilter || $authorFilter == $article->author()->toUser()->name()->value()) : ?>
|
||||
<li class="article | bottom" style="--bottom:3">
|
||||
<a href="<?= $article->url() ?>" class="article__title no-line">
|
||||
<h3><?= $article->title() ?></h3>
|
||||
</a>
|
||||
<div class="article__infos">
|
||||
<p>
|
||||
<?php if (!$authorFilter): ?>
|
||||
<span class="opacity" style="--opacity:.5">par</span>
|
||||
<a class="author no-line" 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="article__labels">
|
||||
<button class="label label--category">[ <?= $article->category() ?> ]</button>
|
||||
</div> -->
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue