figures simples + outdoor computer club

This commit is contained in:
Julie Blanc 2026-04-11 17:49:46 +02:00
parent 76dc174fca
commit 868a5b702c
18 changed files with 531 additions and 352 deletions

View file

@ -13,11 +13,14 @@ if ($block->location() == 'web') {
$src = $image->url();
}
$GLOBALS['figCount'] = ($GLOBALS['figCount'] ?? 0) + 1;
$figId = 'fig-' . Str::slug($page->author()) . '-' . $GLOBALS['figCount'];
?>
<?php if ($src): ?>
<div class="full-bleed-image full-page">
<figure id="<?= $block->id() ?>" class="<?= $fullWidth ? 'full-width' : '' ?>">
<figure id="<?= $figId ?>" class="<?= $fullWidth ? 'full-width' : '' ?>">
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
<?php if ($caption->isNotEmpty()): ?>
<figcaption><?= $caption ?></figcaption>