521 lines
20 KiB
PHP
521 lines
20 KiB
PHP
<?php snippet('header') ?>
|
||
|
||
<!--
|
||
<div class="btn--group__mobile">
|
||
<div class="dropdown dropdown--position-mobile">
|
||
<button class="dropdown__trigger btn--bold-inline no-link">
|
||
<span class="icon"><?= svg('assets/icons/share.svg') ?></span>
|
||
<span class="text">Partager</span>
|
||
</button>
|
||
<div class="dropdown__content">
|
||
<?php snippet('modal-share') ?>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
|
||
|
||
|
||
<main>
|
||
|
||
|
||
<header class="page__header">
|
||
<p class="page__type">Enquête</p>
|
||
<h2 class="page__title"><?= $page->title()->esc() ?></h2>
|
||
<?php if ($page->chapo()->isNotEmpty()): ?>
|
||
<p class="description"><?= $page->chapo()->inline() ?></p>
|
||
<?php endif ?>
|
||
</header>
|
||
|
||
|
||
<div class="page__content">
|
||
<?php
|
||
$videoPreview = $page->videoPreview()->toFile();
|
||
$hasVideo = $videoPreview || $page->videoUrl()->isNotEmpty();
|
||
?>
|
||
|
||
<?php if ($hasVideo): ?>
|
||
<!-- HERO VIDEO -->
|
||
<div id="investigation__hero" class="hero-video">
|
||
<div class="player-container">
|
||
|
||
<?php if ($videoPreview): ?>
|
||
<div class="extract">
|
||
<video class="vjs-tech" id="player-element_html5_api" tabindex="-1" loop="" muted="muted" playsinline="playsinline" autoplay="" src="<?= $videoPreview->url() ?>"></video>
|
||
<button id="hero-play-video"><span class="btn--bold"><?= svg('assets/icons/play.svg') ?> <span class="text">play video</span></button>
|
||
</div>
|
||
<?php endif ?>
|
||
<?php if ($page->videoUrl()->isNotEmpty()): ?>
|
||
<div class="video-full">
|
||
<iframe rel="0" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="<?= $page->title()->esc() ?>" width="480" height="320" src="<?= $page->videoUrl() ?>"></iframe>
|
||
</div>
|
||
<?php endif ?>
|
||
</div>
|
||
|
||
<?php if ($page->heroCaption()->isNotEmpty()): ?>
|
||
<figcaption><?= $page->heroCaption()->inline() ?></figcaption>
|
||
<?php endif ?>
|
||
|
||
</div>
|
||
|
||
<?php elseif ($cover = $page->cover()->toFile()): ?>
|
||
<!-- HERO IMAGE (cover) -->
|
||
<div id="investigation__hero">
|
||
<figure>
|
||
<img src="<?= $cover->url() ?>" alt="<?= $page->title()->esc() ?>">
|
||
</figure>
|
||
<?php if ($page->heroCaption()->isNotEmpty()): ?>
|
||
<figcaption><?= $page->heroCaption()->inline() ?></figcaption>
|
||
<?php elseif ($cover->caption()->isNotEmpty()): ?>
|
||
<figcaption><?= $cover->caption() ?></figcaption>
|
||
<?php endif ?>
|
||
</div>
|
||
|
||
<?php endif ?>
|
||
|
||
|
||
|
||
<dl id="investigation__dl">
|
||
<?php if ($page->incidentDate()->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Date de l'incident</dt>
|
||
<dd><time class="date" datetime="<?= $page->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $page->incidentDate()->toDate('d MMMM yyyy', 'fr_FR') ?></time></dd>
|
||
</div>
|
||
<?php endif ?>
|
||
|
||
<?php if ($page->incidentLocation()->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Lieu de l'incident</dt>
|
||
<dd><?= $page->incidentLocation()->esc() ?></dd>
|
||
</div>
|
||
<?php endif ?>
|
||
|
||
<?php if ($page->incidentConsequences()->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Conséquences</dt>
|
||
<dd><?= $page->incidentConsequences()->esc() ?></dd>
|
||
</div>
|
||
<?php endif ?>
|
||
|
||
<?php if ($keywords = $page->keywords()->split()): ?>
|
||
<?php if (count($keywords) > 0): ?>
|
||
<div class="dl__group dl__group__keywords">
|
||
<dt>Mots-clés</dt>
|
||
<dd>
|
||
<ul class="keywords">
|
||
<?php foreach ($keywords as $keyword): ?>
|
||
<li><a href="#"><?= esc($keyword) ?></a></li>
|
||
<?php endforeach ?>
|
||
</ul>
|
||
</dd>
|
||
</div>
|
||
<?php endif ?>
|
||
<?php endif ?>
|
||
|
||
<?php if ($methodology = $page->methodology()->split()): ?>
|
||
<?php if (count($methodology) > 0): ?>
|
||
<div class="dl__group">
|
||
<dt>Méthodologie</dt>
|
||
<dd>
|
||
<ul>
|
||
<?php foreach ($methodology as $method): ?>
|
||
<li><?= esc($method) ?></li>
|
||
<?php endforeach ?>
|
||
</ul>
|
||
</dd>
|
||
</div>
|
||
<?php endif ?>
|
||
<?php endif ?>
|
||
|
||
<?php if ($team = $page->team()->toStructure()): ?>
|
||
<?php if ($team->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Équipe</dt>
|
||
<dd><?php
|
||
$members = [];
|
||
foreach ($team as $member) {
|
||
$name = $member->name()->esc();
|
||
if ($member->role()->isNotEmpty()) {
|
||
$members[] = $name . ' (' . $member->role()->esc() . ')';
|
||
} else {
|
||
$members[] = $name;
|
||
}
|
||
}
|
||
echo implode(', ', $members);
|
||
?></dd>
|
||
</div>
|
||
<?php endif ?>
|
||
<?php endif ?>
|
||
|
||
<?php if ($partners = $page->partners()->toStructure()): ?>
|
||
<?php if ($partners->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Partenaire(s)</dt>
|
||
<dd>
|
||
<?php $partnerLinks = [] ?>
|
||
<?php foreach ($partners as $partner): ?>
|
||
<?php if ($partner->link()->isNotEmpty()): ?>
|
||
<?php $partnerLinks[] = '<a href="' . $partner->link() . '" target="_blank">' . $partner->name()->esc() . '</a>' ?>
|
||
<?php else: ?>
|
||
<?php $partnerLinks[] = $partner->name()->esc() ?>
|
||
<?php endif ?>
|
||
<?php endforeach ?>
|
||
<?= implode(', ', $partnerLinks) ?>
|
||
</dd>
|
||
</div>
|
||
<?php endif ?>
|
||
<?php endif ?>
|
||
|
||
<?php if ($page->created()->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Date de publication</dt>
|
||
<dd><time class="date" datetime="<?= $page->created()->toDate('yyyy-MM-dd') ?>"><?= $page->created()->toDate('d MMMM yyyy', 'fr_FR') ?></time></dd>
|
||
</div>
|
||
<?php endif ?>
|
||
</dl>
|
||
|
||
<div id="investigation__content">
|
||
<?php foreach ($page->body()->toLayouts() as $layout): ?>
|
||
<?php
|
||
$columns = $layout->columns();
|
||
$columnCount = $columns->count();
|
||
?>
|
||
|
||
<?php if ($columnCount === 1): ?>
|
||
<?php
|
||
$column = $columns->first();
|
||
$blocks = $column->blocks();
|
||
$hasHeading = false;
|
||
$hasOtherContent = false;
|
||
|
||
// Check what types of content we have
|
||
foreach ($blocks as $block) {
|
||
if ($block->type() === 'heading') {
|
||
$hasHeading = true;
|
||
} else {
|
||
$hasOtherContent = true;
|
||
}
|
||
}
|
||
?>
|
||
|
||
<div class="section-content<?= ($hasHeading && !$hasOtherContent) ? ' section-title-only' : '' ?>">
|
||
<?php foreach ($blocks as $block): ?>
|
||
<?php if ($block->type() === 'heading'): ?>
|
||
<<?= $block->level()->or('h3') ?>><?= $block->text() ?></<?= $block->level()->or('h3') ?>>
|
||
<?php elseif ($block->type() === 'text'): ?>
|
||
<div class="section-txt">
|
||
<?= $block->text() ?>
|
||
</div>
|
||
|
||
<?php elseif ($block->type() === 'image'): ?>
|
||
<div class="media container-figure fig-simple">
|
||
<?php $image = $block->image()->toFile(); ?>
|
||
<?php if ($image): ?>
|
||
<figure>
|
||
<img src="<?= $image->url() ?>" alt="<?= $image->alt()->esc() ?>">
|
||
</figure>
|
||
<?php if ($image->caption()->isNotEmpty()): ?>
|
||
<p class="caption"><?= $image->caption()->html() ?></p>
|
||
<?php endif ?>
|
||
<?php endif ?>
|
||
</div>
|
||
|
||
<?php elseif ($block->type() === 'beforeafter'): ?>
|
||
<div class="media">
|
||
<?php snippet('blocks/' . $block->type(), ['block' => $block]) ?>
|
||
</div>
|
||
|
||
<?php elseif ($block->type() === 'video'): ?>
|
||
<div class="media container-video">
|
||
<?php snippet('blocks/' . $block->type(), ['block' => $block]) ?>
|
||
</div>
|
||
|
||
<?php elseif ($block->type() === 'horizontal-gallery'): ?>
|
||
<?php snippet('blocks/' . $block->type(), ['block' => $block]) ?>
|
||
|
||
<?php elseif ($block->type() === 'insert'): ?>
|
||
<?php snippet('blocks/insert', ['block' => $block]) ?>
|
||
|
||
<?php endif ?>
|
||
<?php endforeach ?>
|
||
</div>
|
||
|
||
<?php elseif ($columnCount === 2): ?>
|
||
<div class="section-content">
|
||
<div class="subsection-w-media">
|
||
<?php
|
||
$firstColumn = $columns->first();
|
||
$lastColumn = $columns->last();
|
||
?>
|
||
|
||
<div class="media">
|
||
<?php foreach ($firstColumn->blocks() as $block): ?>
|
||
<?php if ($block->type() === 'image'): ?>
|
||
<div class="container-figure fig-simple">
|
||
<?php $image = $block->image()->toFile(); ?>
|
||
<?php if ($image): ?>
|
||
<figure>
|
||
<img src="<?= $image->url() ?>" alt="<?= $image->alt()->esc() ?>">
|
||
</figure>
|
||
<?php if ($image->caption()->isNotEmpty()): ?>
|
||
<p class="caption"><?= $image->caption()->html() ?></p>
|
||
<?php endif ?>
|
||
<?php endif ?>
|
||
</div>
|
||
|
||
<?php elseif ($block->type() === 'beforeafter'): ?>
|
||
<?php snippet('blocks/' . $block->type(), ['block' => $block]) ?>
|
||
|
||
<?php elseif ($block->type() === 'video'): ?>
|
||
<?php snippet('blocks/' . $block->type(), ['block' => $block]) ?>
|
||
|
||
<?php elseif ($block->type() === 'gallery'): ?>
|
||
<?php snippet('blocks/gallery', ['block' => $block]) ?>
|
||
|
||
<?php endif ?>
|
||
<?php endforeach ?>
|
||
</div>
|
||
|
||
<div class="subsection-txt">
|
||
<?php foreach ($lastColumn->blocks() as $block): ?>
|
||
<?php if ($block->type() === 'text'): ?>
|
||
<?= $block->text() ?>
|
||
<?php elseif ($block->type() === 'heading'): ?>
|
||
<<?= $block->level()->or('h3') ?>><?= $block->text() ?></<?= $block->level()->or('h3') ?>>
|
||
<?php elseif ($block->type() === 'insert'): ?>
|
||
<?php snippet('blocks/insert', ['block' => $block]) ?>
|
||
<?php endif ?>
|
||
<?php endforeach ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<?php endif ?>
|
||
<?php endforeach ?>
|
||
</div>
|
||
|
||
<div class="investigation__aside" id="impacts">
|
||
<h3 class="aside__title">Impacts</h3>
|
||
|
||
<!-- Contenu statique temporaire - sera dynamique quand les pages impacts seront créées -->
|
||
<div class="card--impact-small" data-impact-type="media">
|
||
|
||
<p class="category">Médiatique</p>
|
||
<div class="content">
|
||
<p>12 articles et reprises</p>
|
||
<p>1.5M de vues cumulées</p>
|
||
</div>
|
||
<details class="open-graph__details">
|
||
<summary><p class="summary-inner">Détails <span class="arrow-details"><?= svg('assets/icons/arrow-details.svg') ?></span><p></summary>
|
||
<?php snippet('card-open-graph') ?>
|
||
</details>
|
||
</div>
|
||
|
||
<div class="card--impact-small has-link" data-impact-type="judiciaire">
|
||
<p class="category">Judiciaire</p>
|
||
<p class="date">12 Dec 2025</p>
|
||
<h4 class="title">Ouverture d’une informatin judiciaire suite à la plainte d’Utopia 56</h4>
|
||
<button class="btn--go-to"><a href="#" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||
<a class="link-block" href="#" target="_blank"></a>
|
||
</div>
|
||
|
||
<div class="card--impact-small has-link" data-impact-type="judiciaire">
|
||
<p class="category">Judiciaire</p>
|
||
<p class="date">12 Dec 2025</p>
|
||
<h4 class="title">Conférence de presse aux archives citoyennes</h4>
|
||
<button class="btn--go-to"><a href="#" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||
<a class="link-block" href="#" target="_blank"></a>
|
||
</div>
|
||
|
||
<div class="card--impact-small has-link" data-impact-type="judiciaire">
|
||
<p class="category">Judiciaire</p>
|
||
<p class="date">12 Dec 2025</p>
|
||
<h4 class="title">La justice israélienne déclare ouvrir une enquête sur "les circonstances de la mort de Nidal et Khaled Amirah"</h4>
|
||
<button class="btn--go-to"><a href="#" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||
<a class="link-block" href="#" target="_blank"></a>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<?php
|
||
// Récupérer les enquêtes en lien
|
||
$relatedInvestigations = $page->relatedInvestigations()->toPages();
|
||
if ($relatedInvestigations->isEmpty()) {
|
||
// Si pas d'enquêtes liées définies, prendre les 3 dernières enquêtes (sauf la page actuelle)
|
||
$relatedInvestigations = $page->parent()->children()->filterBy('intendedTemplate', 'investigation')->not($page)->listed()->limit(3);
|
||
}
|
||
?>
|
||
|
||
|
||
|
||
|
||
<aside class="investigation__aside" id="package">
|
||
<h3 class="aside__title">Dans le dossier</h3>
|
||
|
||
<article class="card--package">
|
||
<figure>
|
||
<img src="/media/pages/enquetes/l-homicide-de-nahel-merzouk/fe521629d6-1770640671/nahel-visuel1.png">
|
||
</figure>
|
||
|
||
<div class="content">
|
||
<p class="type">Dossier</p>
|
||
<h4 class="title"><a href="http://localhost:8000/enquetes/l-homicide-de-nahel-merzouk">Violences policières en France</a></h4>
|
||
<ul class="details">
|
||
<li>5 enquêtes</li>
|
||
<li>18 impacts</li>
|
||
</ul>
|
||
|
||
<p class="description">À partir d’images exclusives, l’analyse conjointe de B’Tselem et Index démontre que les deux hommes ont été abattus par des soldats israéliens alors qu’ils ne présentaient aucun danger.</p>
|
||
</div>
|
||
<a class="link-block" href="#" target="_blank" aria-hidden="true"></a>
|
||
<button class="btn--go-to"><a href="#" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||
|
||
</article>
|
||
</aside>
|
||
|
||
|
||
|
||
<?php
|
||
// KIRBY TO DO : récupérer s’il y a un dossier mr
|
||
?>
|
||
|
||
<?php
|
||
// Récupérer le dossier associé à cette investigation
|
||
$packageSlug = $page->package()->value();
|
||
$package = null;
|
||
if (!empty($packageSlug) && site()->find('dossiers')) {
|
||
$package = site()->find('dossiers')->children()->filterBy('slug', $packageSlug)->first();
|
||
}
|
||
|
||
if ($package):
|
||
?>
|
||
<aside class="investigation__aside" id="package">
|
||
<h3 class="aside__title">Dans le dossier</h3>
|
||
|
||
<article class="card--package">
|
||
<?php if ($cover = $package->cover()->toFile()): ?>
|
||
<figure>
|
||
<img src="<?= $cover->url() ?>" alt="<?= $package->title()->esc() ?>">
|
||
</figure>
|
||
<?php endif ?>
|
||
<div class="content">
|
||
<p class="type">Dossier</p>
|
||
<h4 class="title"><a href="<?= $package->url() ?>"><span class="icon"><?= svg('assets/icons/package.svg') ?></span><?= $package->title()->esc() ?></a></h4>
|
||
|
||
|
||
<?php
|
||
// Compter les enquêtes associées à ce dossier
|
||
$investigationsCount = site()->find('enquetes')->children()->listed()->filter(function($investigation) use ($package) {
|
||
return $investigation->package()->value() === $package->slug();
|
||
})->count();
|
||
?>
|
||
|
||
<ul class="details">
|
||
<?php if ($investigationsCount > 0): ?>
|
||
<li><?= $investigationsCount ?> enquête<?= $investigationsCount > 1 ? 's' : '' ?></li>
|
||
<?php endif ?>
|
||
<li>8 impacts</li>
|
||
</ul>
|
||
|
||
<?php if ($package->description()->isNotEmpty()): ?>
|
||
<p class="description"><?= $package->description()->excerpt(200) ?></p>
|
||
<?php endif ?>
|
||
|
||
</div>
|
||
<button class="btn--go-to"><a href="<?= $package->url() ?>" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||
<a class="link-block" href="<?= $package->url() ?>" target="_blank" aria-hidden="true"></a>
|
||
|
||
</article>
|
||
|
||
</aside>
|
||
<?php endif ?>
|
||
|
||
|
||
|
||
|
||
|
||
<?php if ($relatedInvestigations->isNotEmpty()): ?>
|
||
<aside class="investigation__aside" id="related-investigations">
|
||
<h3 class="aside__title">Voir aussi</h3>
|
||
|
||
<?php foreach ($relatedInvestigations as $related): ?>
|
||
<article class="card--article-small">
|
||
<?php if ($cover = $related->cover()->toFile()): ?>
|
||
<figure>
|
||
<img src="<?= $cover->url() ?>" alt="<?= $related->title()->esc() ?>">
|
||
</figure>
|
||
<?php endif ?>
|
||
<div class="content">
|
||
<p class="type">Enquête</p>
|
||
<h4 class="title"><a href="<?= $related->url() ?>"><?= $related->title()->esc() ?></a></h4>
|
||
<?php if ($related->incidentDate()->isNotEmpty()): ?>
|
||
<time class="date" datetime="<?= $related->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $related->incidentDate()->toDate('d MMMM yyyy', 'fr_FR') ?></time>
|
||
|
||
<?php if ($related->chapo()->isNotEmpty()): ?>
|
||
<p class="description"><?= $related->chapo()->excerpt(200) ?></p>
|
||
<?php endif ?>
|
||
|
||
<?php endif ?>
|
||
|
||
</div>
|
||
<button class="btn--go-to"><a href="<?= $related->url() ?>" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||
<a class="link-block" href="<?= $related->url() ?>" target="_blank" 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>
|
||
|
||
</div>
|
||
<?php endif ?>
|
||
|
||
</main>
|
||
|
||
|
||
|
||
<div class="bottom-bar">
|
||
<div class="bottom-bar__inner">
|
||
|
||
<div class="title-group">
|
||
<p class="type">Enquête</p>
|
||
<p class="title"><?= $page->title()->esc() ?></p>
|
||
</div>
|
||
|
||
<div class="dropdown dropdown--position-mobile">
|
||
<button class="dropdown__trigger btn--simple no-link">
|
||
<span class="icon"><?= svg('assets/icons/share.svg') ?></span>
|
||
<span class="text">Partager</span>
|
||
</button>
|
||
<div class="dropdown__content">
|
||
<?php snippet('modal-share') ?>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<button class="btn--simple">
|
||
<a href="#" download>
|
||
<span class="icon"><?= svg('assets/icons/printer.svg') ?></span>
|
||
<span class="text">Télécharger</span>
|
||
</a>
|
||
</button>
|
||
|
||
<button class="btn--simple btn--support"><a targer="_blank" href="https://soutenir.index.ngo/">Soutenez-nous</a></button>
|
||
|
||
<button class="btn--simple btn--back-to-top">
|
||
<a href="#"><span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></a>
|
||
</button>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<?php snippet('footer') ?>
|