blueprint & templates Impacts
All checks were successful
Deploy / Deploy to Production (push) Successful in 13s
All checks were successful
Deploy / Deploy to Production (push) Successful in 13s
This commit is contained in:
parent
fab10a38d8
commit
7b3ebb3ca4
15 changed files with 369 additions and 237 deletions
53
site/templates/impact.php
Normal file
53
site/templates/impact.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php snippet('header') ?>
|
||||
|
||||
<main>
|
||||
|
||||
<header class="page__header">
|
||||
<p class="page__type">Impact</p>
|
||||
<?php
|
||||
$categories = $page->category()->split();
|
||||
$category = $categories[0] ?? '';
|
||||
?>
|
||||
<?php if ($category): ?>
|
||||
<p class="page__category"><?= esc($category) ?></p>
|
||||
<?php endif ?>
|
||||
<h2 class="page__title"><?= $page->title()->esc() ?></h2>
|
||||
<?php if ($page->created()->isNotEmpty()): ?>
|
||||
<time class="date" datetime="<?= $page->created()->toDate('yyyy-MM-dd') ?>"><?= $page->created()->toDate('d MMMM yyyy', 'fr_FR') ?></time>
|
||||
<?php endif ?>
|
||||
<?php if ($page->chapo()->isNotEmpty()): ?>
|
||||
<p class="page__description"><?= $page->chapo()->inline() ?></p>
|
||||
<?php endif ?>
|
||||
</header>
|
||||
|
||||
|
||||
<div class="page__content">
|
||||
|
||||
<?php if ($cover = $page->cover()->toFile()): ?>
|
||||
<figure class="impact__cover">
|
||||
<?php snippet('picture', ['file' => $cover]) ?>
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->body()->isNotEmpty()): ?>
|
||||
<div class="impact__body">
|
||||
<?= $page->body()->toBlocks() ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $investigations = $page->linkedInvestigations()->toPages() ?>
|
||||
<?php if ($investigations->isNotEmpty()): ?>
|
||||
<aside class="impact__investigations">
|
||||
<h3>Enquêtes liées</h3>
|
||||
<ul class="investigations">
|
||||
<?php foreach ($investigations as $investigation): ?>
|
||||
<li><a href="<?= $investigation->url() ?>"><?= $investigation->title()->esc() ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</aside>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue