add structure to random
This commit is contained in:
parent
b8de28aade
commit
4f3712536a
8 changed files with 98 additions and 11 deletions
31
site/templates/grid.php
Normal file
31
site/templates/grid.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?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->title()) ?>"><?= $page->title() ?></h2>
|
||||
<p>
|
||||
<span class="light">par</span>
|
||||
<a class="author" href="/auteurs/<?= Str::slug($page->author()->toUser()->name()) ?>"><?= $page->author()->toUser()->name() ?></a><br>
|
||||
<span class="light">publié le </span><?= $page->published()->toDate('d/m/Y') ?><br>
|
||||
<span class="light">dans</span> <a href="<?= $page->parent()->url() ?>"><?= $page->parent()->title() ?></a> / <a href="/categories/<?= $page->category() ?>"><?= $page->category() ?></a>
|
||||
</p>
|
||||
<?php endslot() ?>
|
||||
<?php endsnippet() ?>
|
||||
<div class="content">
|
||||
<?php foreach ($page->body()->toLayouts() as $layout): ?>
|
||||
<section class="grid" id="<?= $layout->id() ?>">
|
||||
<?php foreach ($layout->columns() as $column): ?>
|
||||
<div class="column" style="--span:<?= $column->span() ?>">
|
||||
<div class="blocks">
|
||||
<?= $column->blocks() ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue