267 lines
No EOL
8.6 KiB
PHP
267 lines
No EOL
8.6 KiB
PHP
<?php snippet('header') ?>
|
||
<main>
|
||
|
||
<section class="section--home" id="home__hero">
|
||
|
||
<div class="section--inner">
|
||
<p class="baseline">Index est une ONG d’investigation numérique, au service du public, de la vérité et de la justice.</p>
|
||
|
||
<button class="btn--bold-inline">
|
||
<a href="#">
|
||
<span class="text">En savoir plus</span>
|
||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||
</a>
|
||
</button>
|
||
|
||
</div>
|
||
</section>
|
||
|
||
|
||
|
||
<section class="section--home" id="home__investigations">
|
||
<div class="section--inner">
|
||
|
||
<div class="col-left">
|
||
<?php $investigationsPage = site()->find('enquetes'); ?>
|
||
<h2 class="title-section"><?= $investigationsPage ? $investigationsPage->title() : 'Enquêtes' ?></h2>
|
||
<?php if ($investigationsPage && $investigationsPage->chapo()->isNotEmpty()): ?>
|
||
<p class="description-section">
|
||
<?= $investigationsPage->chapo() ?>
|
||
</p>
|
||
<?php endif ?>
|
||
<button class="btn--bold-inline">
|
||
<a href="/enquetes">
|
||
<span class="text">Voir les enquêtes</span>
|
||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||
</a>
|
||
</button>
|
||
</div>
|
||
|
||
<div class="col-right">
|
||
|
||
<div class="home-investigations-slider swiper">
|
||
<div class="swiper-wrapper">
|
||
|
||
<?php
|
||
$latestInvestigations = site()->find('enquetes')->children()->listed()->sortBy('created', 'desc')->limit(3);
|
||
foreach ($latestInvestigations as $investigation):
|
||
?>
|
||
|
||
<div class="swiper-slide">
|
||
<div class="swiper-slide__inner">
|
||
<article class="card--article">
|
||
|
||
<?php if ($cover = $investigation->cover()->toFile()): ?>
|
||
<figure>
|
||
<img src="<?= $cover->url() ?>" alt="<?= $investigation->title()->esc() ?>">
|
||
</figure>
|
||
<?php endif ?>
|
||
|
||
<div class="content">
|
||
|
||
<h4 class="title"><a href="<?= $investigation->url() ?>"><?= $investigation->title()->esc() ?></a></h4>
|
||
|
||
<?php if ($investigation->chapo()->isNotEmpty()): ?>
|
||
<p class="description"><?= $investigation->chapo()->excerpt(200) ?></p>
|
||
<?php endif ?>
|
||
|
||
<time class="time-alone" datetime="<?= $investigation->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $investigation->incidentDate()->toDate('d MMMM yyyy', 'fr_FR') ?></time>
|
||
|
||
</div>
|
||
|
||
<?php if ($keywords = $investigation->keywords()->split()): ?>
|
||
<div class="keywords-wrapper">
|
||
<ul class="keywords">
|
||
<?php foreach ($keywords as $keyword): ?>
|
||
<li><a href="#keyword" target="_blank"><?= esc($keyword) ?></a></li>
|
||
<?php endforeach ?>
|
||
</ul>
|
||
</div>
|
||
<?php endif ?>
|
||
|
||
<?php if ($investigation->pinned()->toBool()): ?>
|
||
<div class="pin"><?= svg('assets/icons/pin.svg') ?></div>
|
||
<?php endif ?>
|
||
|
||
<a class="link-block" href="<?= $investigation->url() ?>"></a>
|
||
</article>
|
||
</div>
|
||
</div>
|
||
<?php endforeach ?>
|
||
|
||
</div> <!-- swiper-wrapper -->
|
||
|
||
<!-- Navigation buttons -->
|
||
<div class="swiper-button-prev"></div>
|
||
<div class="swiper-button-next"></div>
|
||
|
||
<!-- Pagination -->
|
||
<div class="swiper-pagination"></div>
|
||
</div> <!-- home-investigations-slider -->
|
||
|
||
</div> <!-- col-right-->
|
||
</div>
|
||
</section>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="section--home" id="home__impacts">
|
||
<div class="section--inner">
|
||
|
||
<div class="col-left">
|
||
<?php $impactsPage = site()->find('impacts'); ?>
|
||
<h2 class="title-section"><?= $impactsPage ? $impactsPage->title() : 'Impacts' ?></h2>
|
||
<?php if ($impactsPage && $impactsPage->chapo()->isNotEmpty()): ?>
|
||
<p class="description-section">
|
||
<?= $impactsPage->chapo() ?>
|
||
</p>
|
||
<?php endif ?>
|
||
<button class="btn--bold-inline">
|
||
<a href="/impacts">
|
||
<span class="text">Voir les impacts</span>
|
||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||
</a>
|
||
</button>
|
||
</div>
|
||
|
||
<div class="col-right">
|
||
|
||
<div class="card--impact" data-impact-type="media">
|
||
<p class="tag">Médiatique</p>
|
||
<div class="content">
|
||
<?php snippet('card-open-graph') ?>
|
||
|
||
</div>
|
||
<ul class="investigations">
|
||
<li><a href="/enquetes/l-execution-de-nidal-et-khaled-amirah-a-naplouse"><span class="icon"><?= svg('assets/icons/article.svg') ?></span> L'exécution de Nidal et Khaled 'Amirah à Naplouse</a></li>
|
||
<li><a href="/enquetes/l-homicide-de-nahel-merzouk"><span class="icon"><?= svg('assets/icons/article.svg') ?></span> L’homicide de Nahel Merzouk</a></li>
|
||
|
||
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="card--impact has-link" data-impact-type="judiciaire">
|
||
<p class="tag">Judiciaire</p>
|
||
<p class="date">12 Dec 2025</p>
|
||
<div class="content">
|
||
<p>La justice israélienne déclare ouvrir une enquête sur "les circonstances de la mort de Nidal et Khaled Amirah".
|
||
</p>
|
||
|
||
</div>
|
||
<ul class="investigations">
|
||
<li><a href="/enquetes/l-execution-de-nidal-et-khaled-amirah-a-naplouse"><span class="icon"><?= svg('assets/icons/article.svg') ?></span> L'exécution de Nidal et Khaled 'Amirah à Naplouse</a></li>
|
||
</ul>
|
||
<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 has-link" data-impact-type="judiciaire">
|
||
<p class="tag">Judiciaire</p>
|
||
<p class="date">12 Dec 2025</p>
|
||
<div class="content">
|
||
<p>La justice israélienne déclare ouvrir une enquête sur "les circonstances de la mort de Nidal et Khaled Amirah"
|
||
</p>
|
||
|
||
</div>
|
||
<ul class="investigations">
|
||
<li><a href="/enquetes/l-execution-de-nidal-et-khaled-amirah-a-naplouse"><span class="icon"><?= svg('assets/icons/article.svg') ?></span> L'exécution de Nidal et Khaled 'Amirah à Naplouse</a></li>
|
||
</ul>
|
||
<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><!-- col-right -->
|
||
|
||
|
||
</div>
|
||
</section>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="section--home" id="home__folders">
|
||
<div class="section--inner">
|
||
|
||
<div class="col-left">
|
||
<?php $foldersPage = site()->find('dossiers'); ?>
|
||
<h2 class="title-section"><?= $foldersPage ? $foldersPage->title() : 'Dossiers' ?></h2>
|
||
<?php if ($foldersPage && $foldersPage->chapo()->isNotEmpty()): ?>
|
||
<p class="description-section">
|
||
<?= $foldersPage->chapo() ?>
|
||
</p>
|
||
<?php endif ?>
|
||
<button class="btn--bold-inline">
|
||
<a href="/dossiers">
|
||
<span class="text">Voir les dossiers</span>
|
||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||
</a>
|
||
</button>
|
||
</div>
|
||
|
||
<div class="col-right">
|
||
|
||
<?php
|
||
$latestFolders = site()->find('dossiers') ? site()->find('dossiers')->children()->listed()->sortBy('created', 'desc')->limit(2) : [];
|
||
if (count($latestFolders) > 0):
|
||
foreach ($latestFolders as $folder):
|
||
?>
|
||
<article class="card--folder">
|
||
|
||
<?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="<?= $folder->url() ?>"><span class="icon"><?= svg('assets/icons/folder.svg') ?></span><?= $folder->title()->esc() ?></a></h4>
|
||
|
||
<?php if ($folder->description()->isNotEmpty()): ?>
|
||
<p class="short"><?= $folder->description()->excerpt(200) ?></p>
|
||
<?php endif ?>
|
||
|
||
<?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="<?= $folder->url() ?>" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||
<a class="link-block" href="<?= $folder->url() ?>"></a>
|
||
</article>
|
||
<?php endforeach ?>
|
||
<?php endif ?>
|
||
|
||
</div> <!-- col-right -->
|
||
|
||
</div>
|
||
</section>
|
||
|
||
|
||
|
||
</main>
|
||
<?php snippet('footer') ?>
|