1
0
This commit is contained in:
Philip Wagner
2024-08-31 10:01:49 +02:00
commit 78b6c0d381
1169 changed files with 235103 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
/** @var \Kirby\Cms\Block $block */
$image = $block->image()->toFile();
$alt = $block->alt() ?? $image->alt();
$caption = $block->caption();
$src = $image->url();
?>
<?php if ($src): ?>
<?php if ($block->link()->isNotEmpty()): ?>
<a href="<?= $block->link()->value() ?>">
<?php endif ?>
<figure>
<img srcset="<?= $image->srcset('full') ?>" alt="<?= $alt->esc() ?>" loading="lazy">
<?php if ($caption->isNotEmpty()): ?>
<figcaption>
<?= $caption ?>
</figcaption>
<?php endif ?>
<?php if ($block->link()->isNotEmpty()): ?>
</a>
<?php endif ?>
</figure>
<?php endif ?>