create template packages
All checks were successful
Deploy / Deploy to Production (push) Successful in 5m17s
All checks were successful
Deploy / Deploy to Production (push) Successful in 5m17s
This commit is contained in:
parent
f73b8cb90b
commit
aba8b4f37e
20 changed files with 414 additions and 526 deletions
|
|
@ -9,6 +9,7 @@ tabs:
|
|||
label: Visuel de couverture
|
||||
type: files
|
||||
multiple: false
|
||||
required: true
|
||||
layout: cards
|
||||
width: 1/3
|
||||
image:
|
||||
|
|
@ -20,7 +21,11 @@ tabs:
|
|||
type: writer
|
||||
width: 2/3
|
||||
linkedContent:
|
||||
label: Contenu
|
||||
label: Enquêtes
|
||||
type: pages
|
||||
query: site.find('enquetes').children
|
||||
linkedImpacts:
|
||||
label: Impacts
|
||||
type: pages
|
||||
query: site.find('impacts').children
|
||||
seo: seo/page
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ return [
|
|||
return Str::contains($path, 'pages/news');
|
||||
}
|
||||
],
|
||||
'dossiers' => [
|
||||
'packages' => [
|
||||
'label' => 'Dossiers',
|
||||
'icon' => 'folder',
|
||||
'link' => 'pages/dossiers',
|
||||
'link' => 'pages/packages',
|
||||
'current' => function (string $current): bool {
|
||||
$path = Kirby\Cms\App::instance()->path();
|
||||
return Str::contains($path, 'pages/dossiers');
|
||||
return Str::contains($path, 'pages/packages');
|
||||
}
|
||||
],
|
||||
'laboratoire' => [
|
||||
|
|
|
|||
|
|
@ -8,13 +8,18 @@ return [
|
|||
'url' => '/en',
|
||||
'translations' => [
|
||||
'impact.type' => 'Impact',
|
||||
'impact.type.plural' => 'Impacts',
|
||||
'impacts.title' => 'Impacts',
|
||||
'news.type' => 'News',
|
||||
'news.title' => 'News',
|
||||
'investigation.type' => 'Investigation',
|
||||
'investigation.type' => 'Investigation',
|
||||
'investigation.type.plural' => 'Investigations',
|
||||
'investigations.title' => 'Investigations',
|
||||
'investigations.related' => 'Related investigations',
|
||||
'investigations.see_all' => 'See all investigations',
|
||||
'filter.all' => 'All',
|
||||
'filter.all.m' => 'All',
|
||||
'package.type' => 'Folder',
|
||||
'packages.title' => 'Folders',
|
||||
],
|
||||
];
|
||||
|
|
@ -9,13 +9,18 @@ return [
|
|||
'url' => '/',
|
||||
'translations' => [
|
||||
'impact.type' => 'Impact',
|
||||
'impact.type.plural' => 'Impacts',
|
||||
'impacts.title' => 'Impacts',
|
||||
'news.type' => 'Brève',
|
||||
'news.title' => 'Brèves',
|
||||
'investigation.type' => 'Enquête',
|
||||
'investigation.type' => 'Enquête',
|
||||
'investigation.type.plural' => 'Enquêtes',
|
||||
'investigations.title' => 'Enquêtes',
|
||||
'investigations.related' => 'Enquêtes liées',
|
||||
'investigations.see_all' => 'Voir toutes les enquêtes',
|
||||
'filter.all' => 'Toutes',
|
||||
'filter.all.m' => 'Tous',
|
||||
'package.type' => 'Dossier',
|
||||
'packages.title' => 'Dossiers',
|
||||
],
|
||||
];
|
||||
|
|
@ -20,7 +20,7 @@ de la vérité et de la justice.</p>
|
|||
|
||||
<li><a href="#">À propos</a></li> <!-- page à créer -->
|
||||
<li><a href="/enquêtes">Equêtes</a></li>
|
||||
<li><a href="/dossiers">Dossiers</a></li>
|
||||
<li><a href="/packages">Dossiers</a></li>
|
||||
<li><a href="#">Contact</a></li>
|
||||
<li><a href="#">À propos</a></li>
|
||||
<li><a href="#">Ressources</a></li>
|
||||
|
|
|
|||
|
|
@ -350,17 +350,17 @@ if ($relatedInvestigations->isEmpty()) {
|
|||
|
||||
|
||||
<?php
|
||||
// Récupérer le dossier associé à cette investigation
|
||||
$packageSlug = $page->package()->value();
|
||||
$package = null;
|
||||
if (!empty($packageSlug) && site()->find('dossiers')) {
|
||||
$package = site()->find('dossiers')->children()->filterBy('slug', $packageSlug)->first();
|
||||
}
|
||||
// Récupérer le dossier associé à cette investigation (reverse lookup via linkedContent)
|
||||
$packagesParent = site()->find('packages');
|
||||
$package = $packagesParent
|
||||
? $packagesParent->children()->listed()->filter(fn($p) => $p->linkedContent()->toPages()->has($page))->first()
|
||||
: null;
|
||||
|
||||
if ($package):
|
||||
$investigationsCount = $package->linkedContent()->toPages()->count();
|
||||
?>
|
||||
<aside class="page__aside" id="package">
|
||||
<h3 class="aside__title">Dans le dossier</h3>
|
||||
<h3 class="aside__title"><?= t('packages.title') ?></h3>
|
||||
|
||||
<article class="card--package">
|
||||
<?php if ($cover = $package->cover()->toFile()): ?>
|
||||
|
|
@ -369,26 +369,17 @@ if ($package):
|
|||
</figure>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<p class="type">Dossier</p>
|
||||
<p class="type"><?= t('package.type') ?></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) {
|
||||
return $investigation->package()->value() === $package->slug();
|
||||
})->count();
|
||||
?>
|
||||
|
||||
<?php if ($investigationsCount > 0): ?>
|
||||
<ul class="details">
|
||||
<?php if ($investigationsCount > 0): ?>
|
||||
<li><?= $investigationsCount ?> enquête<?= $investigationsCount > 1 ? 's' : '' ?></li>
|
||||
<?php endif ?>
|
||||
<li>8 impacts</li>
|
||||
<li><?= $investigationsCount ?> enquête<?= $investigationsCount > 1 ? 's' : '' ?></li>
|
||||
</ul>
|
||||
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<button class="btn--go-to"><a href="<?= $package->url() ?>" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||||
<a class="link-block" href="<?= $package->url() ?>" target="_blank" aria-hidden="true"></a>
|
||||
|
||||
</article>
|
||||
|
||||
</aside>
|
||||
|
|
@ -443,10 +434,7 @@ if ($package):
|
|||
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
<?php snippet('bottom-bar') ?>
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,212 +2,99 @@
|
|||
<?php snippet('header') ?>
|
||||
<main>
|
||||
|
||||
<?php
|
||||
$lang = kirby()->language();
|
||||
$locale = $lang ? $lang->locale(LC_ALL) : 'fr_FR.UTF-8';
|
||||
$dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5);
|
||||
|
||||
$investigations = $page->linkedContent()->toPages();
|
||||
$impacts = $page->linkedImpacts()->toPages();
|
||||
?>
|
||||
|
||||
<header class="page__header">
|
||||
<p class="page__type">Dossier</p>
|
||||
<p class="page__type"><?= t('package.type') ?></p>
|
||||
<h2 class="page__title"><?= $page->title() ?></h2>
|
||||
|
||||
<?php if ($page->description()->isNotEmpty()): ?>
|
||||
<div class="description">
|
||||
<p><?= $page->description() ?></p>
|
||||
</div>
|
||||
<?php if ($investigations->isNotEmpty() || $impacts->isNotEmpty()): ?>
|
||||
<ul class="details">
|
||||
<?php if ($investigations->isNotEmpty()): ?>
|
||||
<li><a href="#investigations"><?= $investigations->count() ?> <?= $investigations->count() > 1 ? t('investigation.type.plural') : t('investigation.type') ?></a></li>
|
||||
<?php endif ?>
|
||||
<?php if ($impacts->isNotEmpty()): ?>
|
||||
<li><a href="#impacts"><?= $impacts->count() ?> <?= $impacts->count() > 1 ? t('impact.type.plural') : t('impact.type') ?></a></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
// Récupérer les enquêtes associées à ce dossier
|
||||
$investigations = site()->find('enquetes')->children()->listed()->filter(function($investigation) use ($page) {
|
||||
return $investigation->package()->value() === $page->slug();
|
||||
});
|
||||
?>
|
||||
|
||||
|
||||
<div class="btn--group" id="nav-package">
|
||||
<button class="btn--small"><a href="#section__investigations">Enquêtes <span class="arrow"><?= svg('assets/icons/arrow-left.svg') ?></span></a></button>
|
||||
<button class="btn--small"><a href="#section__impacts">Impacts <span class="arrow"><?= svg('assets/icons/arrow-left.svg') ?></span></a></button>
|
||||
<?php if ($page->description()->isNotEmpty()): ?>
|
||||
<div class="page__content">
|
||||
<p><?= $page->description() ?></p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content-package">
|
||||
|
||||
|
||||
<?php if ($investigations->isNotEmpty()): ?>
|
||||
<section class="container-cards" id="section__investigations">
|
||||
|
||||
<h3 class="container__title">2 enquêtes</h3>
|
||||
<div class="package__section" id="investigations">
|
||||
<h3 class="section__title"><?= t('investigations.title') ?> (<?= $investigations->count() ?>)</h3>
|
||||
|
||||
<?php foreach ($investigations as $investigation): ?>
|
||||
<article class="card--article">
|
||||
|
||||
<article class="card--article-small">
|
||||
<?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">
|
||||
<p class="type"><?= t('investigation.type') ?></p>
|
||||
<h4 class="title"><a href="<?= $investigation->url() ?>"><?= $investigation->title()->esc() ?></a></h4>
|
||||
<?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>
|
||||
<time class="date" datetime="<?= $investigation->incidentDate()->toDate('yyyy-MM-dd') ?>"><?= $investigation->incidentDate()->toDate('d MMMM yyyy', $dateLocale) ?></time>
|
||||
<?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 if ($investigation->chapo()->isNotEmpty()): ?>
|
||||
<p class="description"><?= $investigation->chapo()->excerpt(200) ?></p>
|
||||
<?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 ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="link-block" href="<?= $investigation->url() ?>"></a>
|
||||
<button class="btn--go-to"><a href="<?= $investigation->url() ?>"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||||
<a class="link-block" href="<?= $investigation->url() ?>" aria-hidden="true"></a>
|
||||
</article>
|
||||
<?php endforeach ?>
|
||||
|
||||
</section>
|
||||
<?php else: ?>
|
||||
<p>Aucune enquête associée à ce dossier pour le moment.</p>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
<?php if ($impacts->isNotEmpty()): ?>
|
||||
<div class="package__section" id="impacts">
|
||||
<h3 class="section__title"><?= t('impacts.title') ?> (<?= $impacts->count() ?>)</h3>
|
||||
|
||||
<section id="section__impacts">
|
||||
|
||||
|
||||
<h3 class="container__title">4 impacts</h3>
|
||||
|
||||
<!-- Contenu statique temporaire -->
|
||||
|
||||
|
||||
|
||||
<div class="card--impact has-link" data-impact-type="judiciaire">
|
||||
<div class="card--impact__inner">
|
||||
<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>
|
||||
<?php foreach ($impacts as $impact): ?>
|
||||
<div class="card--block-small has-link">
|
||||
<div class="group-top">
|
||||
<p class="type"><?= t('impact.type') ?></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 ?>
|
||||
|
||||
<div class="keywords-wrapper">
|
||||
<ul class="keywords">
|
||||
<li><a href="#keyword" target="_blank">Occupation</a></li>
|
||||
<li><a href="#keyword" target="_blank">Colonialité</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="card--impact has-link" data-impact-type="judiciaire">
|
||||
<div class="card--impact__inner">
|
||||
<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 class="keywords-wrapper">
|
||||
<ul class="keywords">
|
||||
<li><a href="#keyword" target="_blank">Occupation</a></li>
|
||||
<li><a href="#keyword" target="_blank">Colonialité</a></li>
|
||||
<li><a href="#keyword" target="_blank">Forces armées</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="card--impact" data-impact-type="media">
|
||||
<div class="card--impact__inner">
|
||||
<p class="tag">Médiatique</p>
|
||||
|
||||
<?php snippet('card-open-graph') ?>
|
||||
|
||||
|
||||
<div class="keywords-wrapper">
|
||||
<ul class="keywords">
|
||||
<li><a href="#keyword" target="_blank">Occupation</a></li>
|
||||
<li><a href="#keyword" target="_blank">Colonialité</a></li>
|
||||
<li><a href="#keyword" target="_blank">Forces armées</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card--impact" data-impact-type="public">
|
||||
<div class="card--impact__inner">
|
||||
<p class="tag">Judiciaire</p>
|
||||
<p class="date">12 Dec 2025</p>
|
||||
<div class="content">
|
||||
<p>Index présente une série d'enquêtes récentes au Festival du Réel 2025.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="keywords-wrapper">
|
||||
<ul class="keywords">
|
||||
<li><a href="#keyword" target="_blank">Evènement</a></li>
|
||||
<li><a href="#keyword" target="_blank">Actualité d’Index</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -17,41 +17,43 @@
|
|||
|
||||
|
||||
<?php foreach ($page->children()->listed() as $package): ?>
|
||||
<article class="card--package">
|
||||
|
||||
<?php if ($cover = $package->cover()->toFile()): ?>
|
||||
<figure>
|
||||
<img src="<?= $cover->url() ?>" alt="<?= $package->title()->esc() ?>">
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<h4 class="title"><a href="<?= $package->url() ?>"><span class="icon"><?= svg('assets/icons/package.svg') ?></span><?= $package->title()->esc() ?></a></h4>
|
||||
|
||||
<?php if ($package->description()->isNotEmpty()): ?>
|
||||
<p class="short"><?= $package->description()->excerpt(200) ?></p>
|
||||
<article class="card--package">
|
||||
<?php if ($cover = $package->cover()->toFile()): ?>
|
||||
<figure>
|
||||
<img src="<?= $cover->url() ?>" alt="<?= $package->title()->esc() ?>">
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<p class="type"><?= t('package.type') ?></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) {
|
||||
return $investigation->package()->value() === $package->slug();
|
||||
})->count();
|
||||
?>
|
||||
<!-- <?php if ($package->description()->isNotEmpty()): ?>
|
||||
<p class="description"><?= $package->description()->excerpt(100) ?></p>
|
||||
<?php endif ?> -->
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
$investigationsCount = $package->linkedContent()->toPages()->count();
|
||||
$impactsCount = $package->linkedImpacts()->toPages()->count();
|
||||
?>
|
||||
<?php if ($investigationsCount > 0 || $impactsCount > 0): ?>
|
||||
<ul class="details">
|
||||
<?php if ($investigationsCount > 0): ?>
|
||||
<li><?= $investigationsCount ?> enquête<?= $investigationsCount > 1 ? 's' : '' ?></li>
|
||||
<li><?= $investigationsCount ?> enquête<?= $investigationsCount > 1 ? 's' : '' ?></li>
|
||||
<?php endif ?>
|
||||
<li>8 impacts</li>
|
||||
</ul>
|
||||
<?php if ($impactsCount > 0): ?>
|
||||
<li><?= $impactsCount ?> impact<?= $impactsCount > 1 ? 's' : '' ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<button class="btn--go-to"><a href="<?= $package->url() ?>" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||||
<a class="link-block" href="<?= $package->url() ?>" target="_blank" aria-hidden="true"></a>
|
||||
</article>
|
||||
|
||||
|
||||
</div>
|
||||
<button class="btn--go-to"><a href="#" target="_blank"><?= svg('assets/icons/arrow-left.svg') ?></a></button>
|
||||
<a class="link-block" href="<?= $package->url() ?>"></a>
|
||||
</article>
|
||||
<?php endforeach ?>
|
||||
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue