page-cover with caption
All checks were successful
Deploy / Deploy to Production (push) Successful in 12s

This commit is contained in:
Julie Blanc 2026-02-25 19:05:22 +01:00
parent c34384adab
commit 6cd89d11fb
17 changed files with 355 additions and 23 deletions

View file

@ -1,6 +1,6 @@
<?php snippet('header') ?>
<main>
<main class="main__single">
<?php
$lang = kirby()->language();
@ -25,8 +25,21 @@ $impacts = $page->linkedImpacts()->toPages();
<?php endif ?>
</ul>
<?php endif ?>
<?php if ($cover = $page->cover()->toFile()): ?>
<figure class="page__cover">
<?php snippet('picture', ['file' => $cover]) ?>
</figure>
<?php if ($cover->caption()->isNotEmpty()): ?>
<p class="caption"><?= $cover->caption()->html() ?></p>
<?php endif ?>
<?php endif ?>
</header>
<?php if ($page->description()->isNotEmpty()): ?>
<div class="page__content">
<p><?= $page->description() ?></p>