82 lines
3 KiB
PHP
82 lines
3 KiB
PHP
<?php snippet('header') ?>
|
|
|
|
<main class="main__single">
|
|
|
|
<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 ?>
|
|
|
|
<?php if ($cover = $page->cover()->toFile()): ?>
|
|
<figure class="page__cover">
|
|
<?php snippet('picture', ['file' => $cover]) ?>
|
|
</figure>
|
|
<?php endif ?>
|
|
|
|
</header>
|
|
|
|
|
|
<div class="page__content">
|
|
|
|
|
|
|
|
<?php if ($page->body()->isNotEmpty()): ?>
|
|
<?= $page->body()->toBlocks() ?>
|
|
<?php endif ?>
|
|
|
|
</div>
|
|
|
|
<?php $investigations = $page->linkedInvestigations()->toPages() ?>
|
|
<?php if ($investigations->isNotEmpty()): ?>
|
|
<aside class="investigation__aside" id="related-investigations">
|
|
<h3 class="aside__title">Enquêtes liées</h3>
|
|
|
|
<?php foreach ($investigations as $investigation): ?>
|
|
<article class="card--article-small">
|
|
<?php if ($cover = $investigation->cover()->toFile()): ?>
|
|
<figure>
|
|
<img src="<?= $cover->url() ?>" alt="<?= $investigation->title()->esc() ?>">
|
|
</figure>
|
|
<?php endif ?>
|
|
<div class="content">
|
|
<p class="type">Enquête</p>
|
|
<h4 class="title"><a href="<?= $investigation->url() ?>"><?= $investigation->title()->esc() ?></a></h4>
|
|
<?php if ($investigation->incidentDate()->isNotEmpty()): ?>
|
|
<time class="date" datetime="<?= $investigation->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $investigation->incidentDate()->toDate('d MMMM yyyy', 'fr_FR') ?></time>
|
|
<?php endif ?>
|
|
<?php if ($investigation->chapo()->isNotEmpty()): ?>
|
|
<p class="description"><?= $investigation->chapo()->excerpt(200) ?></p>
|
|
<?php endif ?>
|
|
</div>
|
|
<button class="btn--go-to"><a href="<?= $investigation->url() ?>"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
|
<a class="link-block" href="<?= $investigation->url() ?>" aria-hidden="true"></a>
|
|
</article>
|
|
<?php endforeach ?>
|
|
|
|
<div class="see-more">
|
|
<button class="btn--bold-inline">
|
|
<a href="/enquetes">
|
|
<span class="text">Voir toutes les enquêtes</span>
|
|
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
|
</a>
|
|
</button>
|
|
</div>
|
|
</aside>
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
</main>
|
|
<?php snippet('footer') ?>
|