card block small + date lang
All checks were successful
Deploy / Deploy to Production (push) Successful in 12s
All checks were successful
Deploy / Deploy to Production (push) Successful in 12s
This commit is contained in:
parent
1fedb2392c
commit
cb2fe498fe
10 changed files with 326 additions and 305 deletions
|
|
@ -16,6 +16,9 @@
|
|||
<?php
|
||||
$videoPreview = $page->videoPreview()->toFile();
|
||||
$hasVideo = $videoPreview || $page->videoUrl()->isNotEmpty();
|
||||
$lang = kirby()->language();
|
||||
$locale = $lang ? $lang->locale(LC_ALL) : 'fr_FR.UTF-8';
|
||||
$dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5);
|
||||
?>
|
||||
|
||||
<?php if ($hasVideo): ?>
|
||||
|
|
@ -63,7 +66,7 @@ $hasVideo = $videoPreview || $page->videoUrl()->isNotEmpty();
|
|||
<?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>
|
||||
<dd><time class="date" datetime="<?= $page->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $page->incidentDate()->toDate('d MMMM yyyy', $dateLocale) ?></time></dd>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
|
@ -153,7 +156,7 @@ $hasVideo = $videoPreview || $page->videoUrl()->isNotEmpty();
|
|||
<?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>
|
||||
<dd><time class="date" datetime="<?= $page->created()->toDate('yyyy-MM-dd') ?>"><?= $page->created()->toDate('d MMMM yyyy', $dateLocale) ?></time></dd>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</dl>
|
||||
|
|
@ -279,12 +282,7 @@ $hasVideo = $videoPreview || $page->videoUrl()->isNotEmpty();
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="page__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">
|
||||
<!-- <div class="card--block-small" data-impact-type="media">
|
||||
|
||||
<p class="category">Médiatique</p>
|
||||
<div class="content">
|
||||
|
|
@ -295,34 +293,50 @@ $hasVideo = $videoPreview || $page->videoUrl()->isNotEmpty();
|
|||
<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> -->
|
||||
|
||||
<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>
|
||||
<?php
|
||||
$impactsParent = site()->find('impacts');
|
||||
$impacts = $impactsParent ? $impactsParent->children()->listed()->filter(function($impact) use ($page) {
|
||||
return $impact->linkedInvestigations()->toPages()->has($page);
|
||||
}) : null;
|
||||
?>
|
||||
|
||||
<?php if ($impacts && $impacts->isNotEmpty()): ?>
|
||||
<aside class="page__aside" id="impacts">
|
||||
<h3 class="aside__title">Impacts</h3>
|
||||
|
||||
<?php foreach ($impacts as $impact): ?>
|
||||
<div class="card--block-small has-link">
|
||||
<div class="group-top">
|
||||
<p class="type">Impact</p>
|
||||
<?php if ($impact->category()->isNotEmpty()): ?>
|
||||
<p class="category"><?= $impact->category()->esc() ?></p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<h4 class="title"><?= $impact->title()->esc() ?></h4>
|
||||
|
||||
<?php if ($impact->created()->isNotEmpty()): ?>
|
||||
<p class="date">
|
||||
<time datetime="<?= $impact->created()->toDate('yyyy-MM-dd') ?>"><?= $impact->created()->toDate('d MMMM yyyy', $dateLocale) ?></time>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
||||
<button class="btn--go-to">
|
||||
<a href="<?= $impact->url() ?>">
|
||||
<?= svg('assets/icons/arrow-left.svg') ?>
|
||||
</a>
|
||||
</button>
|
||||
|
||||
<a class="link-block" href="<?= $impact->url() ?>" aria-hidden="true"></a>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
||||
</aside>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
<?php
|
||||
|
|
@ -335,38 +349,6 @@ if ($relatedInvestigations->isEmpty()) {
|
|||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<aside class="page__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();
|
||||
|
|
@ -389,8 +371,6 @@ if ($package):
|
|||
<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) {
|
||||
|
|
@ -404,10 +384,6 @@ if ($package):
|
|||
<?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>
|
||||
|
|
@ -437,7 +413,7 @@ if ($package):
|
|||
<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>
|
||||
<time class="date" datetime="<?= $related->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $related->incidentDate()->toDate('d MMMM yyyy', $dateLocale) ?></time>
|
||||
|
||||
<?php if ($related->chapo()->isNotEmpty()): ?>
|
||||
<p class="description"><?= $related->chapo()->excerpt(200) ?></p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue