actuel-inactuel/site/templates/linear.php
2024-04-06 10:08:45 +02:00

31 lines
No EOL
1.1 KiB
PHP

<?php snippet('header') ?>
<main id="<?= $page->template() ?>">
<article>
<?php snippet('cover', ['isOpen' => true], slots: true) ?>
<?php slot('title') ?>
<h2 class="main-title <?= setTitleFontSizeClass($page->title()) ?>"><?= $page->title() ?></h2>
<p>
<span class="opacity" style="--opacity:.6">par </span>
<a
class="author"
href="/auteurs/<?= Str::slug($page->author()->toUser()->name()) ?>"
title="Voir les articles d'<?= $page->author()->toUser()->name() ?>"
>
<?= $page->author()->toUser()->name() ?>
</a><br>
<span class="opacity" style="--opacity:.6">publié le </span><?= $page->published()->toDate('d/m/Y') ?>
<span class="opacity" style="--opacity: .6">dans</span> <a href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a>
</p>
<?php endslot() ?>
<?php slot('tabs') ?>
<?php snippet('tabs', [
'left' => [
'label' => 'édito ' . $page->parent()->title(),
'content' => $page->parent()->edito()
],
]) ?>
<?php endslot() ?>
<?php endsnippet() ?>
<?= $page->body() ?>
</article>
</main>