This commit is contained in:
parent
3836144423
commit
4fee638a93
10 changed files with 342 additions and 143 deletions
|
|
@ -40,7 +40,7 @@
|
|||
<nav id="nav-highlight">
|
||||
<ul>
|
||||
<li><a href="/enquetes">Enquêtes</a></li>
|
||||
<li><a href="#">Impact</a></li>
|
||||
<li><a href="/impacts">Impact</a></li>
|
||||
<li class="soutenir"><a targer="_blank" href="https://soutenir.index.ngo/">Soutenez-nous</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ de la vérité et de la justice.</p>
|
|||
<ul>
|
||||
<li class="soutenir highlight"><a href="#">Soutenez-nous</a></li>
|
||||
<li class="highlight"><a href="/enquetes">Enquêtes</a></li>
|
||||
<li class="highlight"><a href="#">Impact</a></li>
|
||||
<li class="highlight"><a href="/impacts">Impact</a></li>
|
||||
<li><a href="/dossiers">Dossiers</a></li>
|
||||
<li><a href="#">Contact</a></li>
|
||||
<li><a href="#">À propos</a></li>
|
||||
|
|
|
|||
|
|
@ -287,32 +287,54 @@ if ($relatedInvestigations->isEmpty()) {
|
|||
// KIRBY TO DO : récupérer s’il y a un dossier mr
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Récupérer le dossier associé à cette investigation
|
||||
$folderSlug = $page->folder()->value();
|
||||
$folder = null;
|
||||
if (!empty($folderSlug) && site()->find('dossiers')) {
|
||||
$folder = site()->find('dossiers')->children()->filterBy('slug', $folderSlug)->first();
|
||||
}
|
||||
|
||||
if ($folder):
|
||||
?>
|
||||
<aside class="section__article" id="section__folder">
|
||||
<h3 class="section__title">Dans le dossier</h3>
|
||||
|
||||
<article class="card--folder">
|
||||
<figure>
|
||||
<img src="/media/pages/enquetes/l-homicide-de-nahel-merzouk/fe521629d6-1768297341/nahel-visuel1.png">
|
||||
<?php if ($cover = $folder->cover()->toFile()): ?>
|
||||
<figure>
|
||||
<img src="<?= $cover->url() ?>" alt="<?= $folder->title()->esc() ?>">
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<h4 class="title"><a href="#"><span class="icon"><?= svg('assets/icons/folder.svg') ?></span>Refus d’optempérer</a></h4>
|
||||
<h4 class="title"><a href="<?= $folder->url() ?>"><span class="icon"><?= svg('assets/icons/folder.svg') ?></span><?= $folder->title()->esc() ?></a></h4>
|
||||
|
||||
<p class="short">
|
||||
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Aperiam dolorum inventore itaque excepturi veritatis asperiores? Aliquid officiis reprehenderit sunt fugit dicta repudiandae dolores natus, doloremque illum, nesciunt, exercitationem vitae labore.
|
||||
</p>
|
||||
<?php if ($folder->description()->isNotEmpty()): ?>
|
||||
<p class="short"><?= $folder->description()->excerpt(200) ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<ul>
|
||||
<li>4 enquêtes</li>
|
||||
<li>8 impacts</li>
|
||||
</ul>
|
||||
<?php
|
||||
// Compter les enquêtes associées à ce dossier
|
||||
$investigationsCount = site()->find('enquetes')->children()->listed()->filter(function($investigation) use ($folder) {
|
||||
return $investigation->folder()->value() === $folder->slug();
|
||||
})->count();
|
||||
?>
|
||||
|
||||
<ul>
|
||||
<?php if ($investigationsCount > 0): ?>
|
||||
<li><?= $investigationsCount ?> enquête<?= $investigationsCount > 1 ? 's' : '' ?></li>
|
||||
<?php endif ?>
|
||||
<li>8 impacts</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<button class="btn--go-to"><a href="#" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||||
<a class="link-block" href="#" target="_blank" aria-hidden="true"></a>
|
||||
<button class="btn--go-to"><a href="<?= $folder->url() ?>" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||||
<a class="link-block" href="<?= $folder->url() ?>" target="_blank" aria-hidden="true"></a>
|
||||
|
||||
</article>
|
||||
|
||||
</aside>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
<div class="description-medium">
|
||||
<p>
|
||||
<?= $page->chapo() ?>
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto dignissimos, sit dolorum minima vel illo aliquam veniam eos assumenda cum quaerat error consequuntur laborum ipsum.
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue