This commit is contained in:
parent
8a4f9d6b64
commit
1ea9f36aa1
9 changed files with 249 additions and 36 deletions
|
|
@ -16,12 +16,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="section--home" id="home__investigations">
|
||||
<div class="section--inner">
|
||||
|
||||
|
|
@ -40,12 +34,15 @@
|
|||
|
||||
<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()): ?>
|
||||
|
|
@ -113,9 +110,18 @@ foreach ($latestInvestigations as $investigation):
|
|||
|
||||
<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>
|
||||
|
|
@ -148,10 +154,55 @@ foreach ($latestInvestigations as $investigation):
|
|||
</div>
|
||||
|
||||
<div class="col-right">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 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">
|
||||
|
||||
|
|
@ -169,9 +220,54 @@ foreach ($latestInvestigations as $investigation):
|
|||
</div>
|
||||
|
||||
<div class="col-right">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?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') ?>
|
||||
|
|
@ -32,9 +32,7 @@
|
|||
|
||||
<?php foreach ($page->children()->listed() as $investigation): ?>
|
||||
<article class="card--article">
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if ($cover = $investigation->cover()->toFile()): ?>
|
||||
<figure>
|
||||
<img src="<?= $cover->url() ?>" alt="<?= $investigation->title()->esc() ?>">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue