fix #14
This commit is contained in:
parent
6801286c5f
commit
aea050f6cc
8 changed files with 36 additions and 73 deletions
|
|
@ -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
16
site/templates/error.php
Normal 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') ?>
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
</p>
|
||||
<?php endslot() ?>
|
||||
<?php endsnippet() ?>
|
||||
|
||||
<div id="main-content">
|
||||
<?= $page->body() ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue