add resources section
This commit is contained in:
parent
87d74195e7
commit
4cd3bfba57
8 changed files with 111 additions and 37 deletions
|
|
@ -19,6 +19,36 @@
|
|||
</section>
|
||||
|
||||
<section class="collapsable-sections">
|
||||
<?php snippet('collapsable-section') ?>
|
||||
<?php snippet('collapsable-section', ['title' => 'Distribution et production'], slots: true) ?>
|
||||
<?php slot('content') ?>
|
||||
<div class="production">
|
||||
<?php foreach ($page->production()->toLayouts() as $layout): ?>
|
||||
<div class="grid" id="<?= $layout->id() ?>">
|
||||
<?php foreach ($layout->columns() as $column): ?>
|
||||
<div class="grid__item" style="--span:<?= $column->span() ?>">
|
||||
<div class="blocks">
|
||||
<?= $column->blocks() ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endslot() ?>
|
||||
<?php endsnippet() ?>
|
||||
|
||||
<?php if ($page->resources()->isNotEmpty()): ?>
|
||||
<?php snippet('collapsable-section', ['title' => 'Ressources'], slots: true) ?>
|
||||
<?php slot('content') ?>
|
||||
<div class="resources grid">
|
||||
<?php foreach($page->resources()->toStructure() as $resource): ?>
|
||||
<div class="resource grid__item" style="--span: 4;">
|
||||
<p><?= $resource->name() ?></p><a href="<?= $resource->file()->toFile()->url() ?>" title="Télécharger le fichier" download>télécharger ↓</a>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endslot() ?>
|
||||
<?php endsnippet() ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue