finish author system
This commit is contained in:
parent
db8669d30d
commit
fe6e01acdf
38 changed files with 614 additions and 73 deletions
|
|
@ -52,14 +52,17 @@
|
|||
>
|
||||
<ul class="panel-item-content__texts">
|
||||
<?php
|
||||
shuffle($category['texts']);
|
||||
$category['texts'];
|
||||
foreach($category['texts'] as $article):
|
||||
?>
|
||||
<?php
|
||||
$author = $article->author()->toPage() == null ? "inconnu" : $article->author()->toPage()->title();
|
||||
?>
|
||||
<li
|
||||
class="text"
|
||||
x-data="{
|
||||
title: '<?= str_replace("'", "\'", $article->title()->value()) ?>',
|
||||
author: '<?= $article->author()->toUser()->name() ?>',
|
||||
author: '<?= $author ?>',
|
||||
yearParent: '<?= $article->parent()->title()->value() ?>',
|
||||
category: '<?= $article->category() ?>',
|
||||
}"
|
||||
|
|
@ -75,8 +78,7 @@
|
|||
</a>
|
||||
<div class="text__infos">
|
||||
<p>
|
||||
<span class="light">par</span>
|
||||
<a class="author" href="/auteurs/<?= Str::slug($article->author()->toUser()->name()) ?>"><?= $article->author()->toUser()->name() ?></a><br>
|
||||
<span class="light">par</span><a class="author" href="/auteurs/<?= Str::slug($author) ?>"><?= $author ?></a><br>
|
||||
<span class="light">publié le </span><?= $article->published()->toDate('d/m/Y') ?><br>
|
||||
<span class="light">dans</span> <a href="<?= $article->parent()->url() ?>"><?= $article->parent()->title() ?></a> / <a href="/categories/<?= $article->category() ?>"><?= $article->category() ?></a>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue