style page-simple + asides
All checks were successful
Deploy / Deploy to Production (push) Successful in 5m17s

This commit is contained in:
Julie Blanc 2026-02-24 17:52:57 +01:00
parent f61b6e8840
commit afe5885708
9 changed files with 69 additions and 36 deletions

View file

@ -36,19 +36,47 @@
<?= $page->body()->toBlocks() ?>
<?php endif ?>
</div>
<?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 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 ?>
</div>
</main>
<?php snippet('footer') ?>