All checks were successful
Deploy / Deploy to Production (push) Successful in 12s
- Add impact-media blueprint (entries field + linked investigation) - Add minimal impact-media template - Refactor card-open-graph snippet: accepts $url param, Kirby cache (6h TTL), decode HTML entities, empty alt on images - Update impacts.yml to allow impact-media pages - Render impact-media in investigation aside with dynamic count + details/summary - Add OG cache config in config.php - CSS formatting fixes (body, card-block-small, category) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<?php snippet('header') ?>
|
|
|
|
<main class="main__single">
|
|
|
|
<header class="page__header">
|
|
<p class="page__type">Impact</p>
|
|
<p class="page__category">Médiatique</p>
|
|
<h2 class="page__title"><?= $page->title()->esc() ?></h2>
|
|
</header>
|
|
|
|
<?php
|
|
$entries = $page->entries()->toEntries();
|
|
$investigation = $page->linkedInvestigation()->toPages()->first();
|
|
?>
|
|
|
|
<?php if ($entries->isNotEmpty()): ?>
|
|
<div class="page__content">
|
|
<?php foreach ($entries as $entry): ?>
|
|
<?php snippet('card-open-graph', ['url' => $entry->value()]) ?>
|
|
<?php endforeach ?>
|
|
</div>
|
|
<?php endif ?>
|
|
|
|
<?php if ($investigation): ?>
|
|
<aside class="page__aside" id="related-investigations">
|
|
<h3 class="aside__title">Enquête liée</h3>
|
|
|
|
<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">
|
|
<p class="type">Enquête</p>
|
|
<h4 class="title"><a href="<?= $investigation->url() ?>"><?= $investigation->title()->esc() ?></a></h4>
|
|
</div>
|
|
<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>
|
|
</aside>
|
|
<?php endif ?>
|
|
|
|
</main>
|
|
|
|
<?php snippet('bottom-bar') ?>
|
|
<?php snippet('footer') ?>
|