273 lines
No EOL
8.1 KiB
PHP
273 lines
No EOL
8.1 KiB
PHP
<?php snippet('header') ?>
|
||
<main>
|
||
|
||
<section class="section--home" id="home__description">
|
||
<div class="section--inner">
|
||
<p>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">
|
||
<h2 class="title-section">Enquêtes</h2>
|
||
<p class="description">
|
||
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Earum quasi cupiditate iste odio adipisci quae, doloribus quas facilis eaque id labore nam, illum animi. Eaque iusto beatae error consequatur totam.
|
||
</p>
|
||
<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">
|
||
<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 ?>
|
||
|
||
<dl class="dl">
|
||
<?php if ($investigation->incidentDate()->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Date de l'incident</dt>
|
||
<dd><time datetime="<?= $investigation->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $investigation->incidentDate()->toDate('d MMMM yyyy', 'fr_FR') ?></time></dd>
|
||
</div>
|
||
<?php endif ?>
|
||
|
||
<?php if ($partners = $investigation->partners()->toStructure()): ?>
|
||
<?php if ($partners->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Partenaire(s)</dt>
|
||
<dd>
|
||
<?php $partnerNames = [] ?>
|
||
<?php foreach ($partners as $partner): ?>
|
||
<?php $partnerNames[] = $partner->name()->value() ?>
|
||
<?php endforeach ?>
|
||
<?= implode(', ', $partnerNames) ?>
|
||
</dd>
|
||
</div>
|
||
<?php endif ?>
|
||
<?php endif ?>
|
||
|
||
<?php if ($investigation->incidentLocation()->isNotEmpty()): ?>
|
||
<div class="dl__group">
|
||
<dt>Lieu de l'incident</dt>
|
||
<dd><?= $investigation->incidentLocation()->esc() ?></dd>
|
||
</div>
|
||
<?php endif ?>
|
||
|
||
|
||
</dl>
|
||
|
||
</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>
|
||
<?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">
|
||
<h2 class="title-section">Impacts</h2>
|
||
<p class="description">
|
||
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Earum quasi cupiditate iste odio adipisci quae, doloribus quas facilis eaque id labore nam, illum animi. Eaque iusto beatae error consequatur totam.
|
||
</p>
|
||
<button class="btn--bold-inline">
|
||
<a href="#">
|
||
<span class="text">Voir les impacts</span>
|
||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||
</a>
|
||
</button>
|
||
</div>
|
||
|
||
<div class="col-right">
|
||
|
||
<!-- Contenu statique temporaire - sera dynamique quand les pages impacts seront créées -->
|
||
<div class="card--impact" data-impact-type="media">
|
||
<p class="tag">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>
|
||
<div class="open-graph__inner">
|
||
<?php snippet('card-open-graph') ?>
|
||
</div>
|
||
</details>
|
||
</div>
|
||
|
||
<div class="card--impact" 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>
|
||
</div>
|
||
|
||
<div class="card--impact" 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>
|
||
|
||
</div>
|
||
|
||
|
||
</div><!-- col-right -->
|
||
|
||
|
||
</div>
|
||
</section>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="section--home" id="home__folders">
|
||
<div class="section--inner">
|
||
|
||
<div class="col-left">
|
||
<h2 class="title-section">Dossiers</h2>
|
||
<p class="description">
|
||
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Earum quasi cupiditate iste odio adipisci quae, doloribus quas facilis eaque id labore nam, illum animi. Eaque iusto beatae error consequatur totam.
|
||
</p>
|
||
<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() ?>"><?= $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') ?>
|