This commit is contained in:
parent
6d71b353f3
commit
ace7dfaede
5 changed files with 343 additions and 388 deletions
|
|
@ -1,54 +1,29 @@
|
|||
<?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--home">
|
||||
<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--home">
|
||||
<a href="/enquetes">
|
||||
<span class="text">Voir les enquêtes</span>
|
||||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
<p class="baseline-section">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>
|
||||
|
||||
<div class="col-right">
|
||||
<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">
|
||||
<?php $latestInvestigations = site()->find('enquetes')->children()->listed()->sortBy('created', 'desc')->limit(3);
|
||||
foreach ($latestInvestigations as $investigation):
|
||||
?>
|
||||
|
||||
<article class="card--article">
|
||||
|
||||
<?php if ($cover = $investigation->cover()->toFile()): ?>
|
||||
|
|
@ -57,18 +32,46 @@
|
|||
</figure>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<h4 class="title"><a href="<?= $investigation->url() ?>"><?= $investigation->title()->esc() ?></a></h4>
|
||||
|
||||
<time class="time-alone" datetime="<?= $investigation->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $investigation->incidentDate()->toDate('d MMMM yyyy', 'fr_FR') ?></time>
|
||||
|
||||
<?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 ?>
|
||||
|
||||
</div>
|
||||
<?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>
|
||||
|
||||
<?php if ($keywords = $investigation->keywords()->split()): ?>
|
||||
<div class="keywords-wrapper">
|
||||
|
|
@ -86,21 +89,90 @@
|
|||
|
||||
<a class="link-block" href="<?= $investigation->url() ?>"></a>
|
||||
</article>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php $latestInvestigations = site()->find('enquetes')->children()->listed()->sortBy('created', 'desc')->limit(3);
|
||||
foreach ($latestInvestigations as $investigation):
|
||||
?>
|
||||
|
||||
<article class="card--article">
|
||||
|
||||
<?php if ($cover = $investigation->cover()->toFile()): ?>
|
||||
<figure>
|
||||
<img src="<?= $cover->url() ?>" alt="<?= $investigation->title()->esc() ?>">
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
<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>
|
||||
</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>
|
||||
|
||||
<?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>
|
||||
<?php endforeach ?>
|
||||
|
||||
</div> <!-- swiper-wrapper -->
|
||||
|
||||
<!-- Navigation buttons -->
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
<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>
|
||||
|
||||
<!-- Pagination -->
|
||||
<div class="swiper-pagination"></div>
|
||||
</div> <!-- home-investigations-slider -->
|
||||
|
||||
</div> <!-- col-right-->
|
||||
</div> <!-- col-right-->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
@ -113,22 +185,21 @@
|
|||
<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--home">
|
||||
|
||||
<p class="baseline-section">Nos travaux sont régulièrement présentés dans les tribunaux, les médias et les espaces de discours public.</p>
|
||||
|
||||
|
||||
<button class="btn--bold-inline">
|
||||
<a href="/impacts">
|
||||
<span class="text">Voir les impacts</span>
|
||||
<span class="text">En savoir plus</span>
|
||||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||||
</a>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-right grid-masonry">
|
||||
<div class="col-right">
|
||||
|
||||
<div class="grid-masonry">
|
||||
|
||||
<div class="grid-sizer"></div>
|
||||
|
||||
|
|
@ -226,12 +297,16 @@
|
|||
<a class="link-block" href="#" target="_blank"></a>
|
||||
</div>
|
||||
|
||||
</div> <!-- end masonry -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="see-more">
|
||||
<button class="btn--bold-inline">
|
||||
<a href="/impacts">
|
||||
<span class="text">Voir tout</span>
|
||||
<span class="icon"><?= svg('assets/icons/arrow-left.svg') ?></span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue