This commit is contained in:
isUnknown 2025-01-26 13:00:50 +01:00
parent 6801286c5f
commit aea050f6cc
8 changed files with 36 additions and 73 deletions

View file

@ -1,13 +1,16 @@
<?php snippet('header'); ?>
<main id="<?= $page->template() ?>">
<article>
<?php snippet('cover', slots: true) ?>
<?php slot('text') ?>
<h2 class="main-title <?= setTitleFontSizeClass($page->title()) ?>"><?= $page->title() ?></h2>
<?= $page->presentation() ?>
<article>
<?php snippet('cover', slots: true) ?>
<?php slot('title') ?>
<h2 class="main-title <?= setTitleFontSizeClass($page->title()) ?>"><?= $page->title() ?></h2>
<?= $page->presentation() ?>
<?php endslot() ?>
<?php endsnippet() ?>
<div id="main-content">
<p class="h3">textes :</p>
<ul class="texts">
<ul class="texts">
<?php foreach(page('textes')->grandChildren() as $article): ?>
<?php
if ($article->author()->toPage()->title()->value() == $page->title()->value()): ?>
@ -19,17 +22,14 @@
</a>
<div class="text__infos">
<p>
<span class="light">par</span>
<a class="author" href="/auteurs/<?= Str::slug($article->author()->toPage()->title()) ?>"><?= $article->author()->toPage()->title() ?></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>
</div>
</li>
<?php endif ?>
</ul>
<?php endforeach ?>
<?php endslot() ?>
<?php endsnippet() ?>
</article>
</ul>
</div>
</article>
</main>

16
site/templates/error.php Normal file
View file

@ -0,0 +1,16 @@
<?php snippet('header') ?>
<main id="<?= $page->template() ?>">
<article>
<?php snippet('cover', array('isOpen' => true), slots: true) ?>
<?php slot('title') ?>
<h2 class="main-title <?= setTitleFontSizeClass("Page introuvable") ?>">Page introuvable</h2>
<p><a href="/">Retour à l'accueil</a></p>
<?php endslot() ?>
<?php endsnippet() ?>
<div id="main-content">
<?= $page->body() ?>
</div>
</article>
</main>
<?php snippet('footer') ?>

View file

@ -12,6 +12,7 @@
</p>
<?php endslot() ?>
<?php endsnippet() ?>
<div id="main-content">
<?= $page->body() ?>
</div>