add link on hero image

This commit is contained in:
isUnknown 2024-09-13 16:12:42 +02:00
parent 7306ad616d
commit 7bdfdbe720

View file

@ -7,7 +7,13 @@
<?php endif ?>
</div>
<div class="hero__image">
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
<?php if ($site->heroLinkUrl()->isNotEmpty() == 'true'): ?>
<a href="<?= $site->heroLinkUrl()->toUrl() ?>">
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
</a>
<?php else: ?>
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
<?php endif ?>
</div>
</section>