<?php
/**
 * @category    FishPig
 * @package     FishPig_WordPress
 * @author      Ben Tideswell <help@fishpig.co.uk>
 */
// phpcs:ignoreFile -- long lines (todo)
?>
<?php if ($block->getImageUrl()): ?>
    <div class="block block-blog block-image">
        <?php if ($title = $block->getTitle()): ?>
            <div class="block-title">
                <strong><?= $block->escapeHtml(__($title)) ?></strong>
            </div>
        <?php endif; ?>
        <div class="block-content">
            <?php if ($block->getLinkUrl()): ?><a href="<?= $block->escapeUrl($block->getLinkUrl()) ?>"<?php if ($block->getLinkTarget()): ?> target="<?= $block->escapeHtml($block->getLinkTarget()) ?>"<?php endif; ?>><?php endif; ?>
                <img src="<?= $block->escapeUrl($block->getImageUrl()) ?>" alt="<?= $block->escapeHtml($block->getImageAlt()) ?>" style="max-width: 100%;" />
            <?php if ($block->getLinkUrl()): ?></a><?php endif; ?>
            <?php if ($block->getCaption()): ?>
                <p><?= $block->escapeHtml($block->getCaption()) ?></p>
            <?php endif; ?>
        </div>
    </div>
<?php endif; ?>