<?php declare(strict_types=1); ?>

<!-- Display a list of downloads in teaser view -->
<?php if ($contentObjects): ?>
<?php foreach ($contentObjects as $content): ?>
<div class="clearfix">
    <div class="text-left">
        <h3><a href="<?php echo $content->getUrl($targetFileName); ?>"><?php echo $content->icon; ?> <?php echo $content->escapeForXss('title'); ?></a></h3>
    </div>
    <?php if ($content->image): ?>
    <div class="float-left">
        <figure class="figure-left">
            <a href="<?php echo $content->getUrl($targetFileName); ?>">
                <img class="img-fluid" src="<?php echo $content->getCachedImage(100); ?>" 
                     <?php if ($content->caption): ?>
                     title="<?php echo $content->escapeForXss('caption'); ?>" alt="<?php echo $content->escapeForXss('caption'); ?>"
                     <?php else: ?>
                     alt=""
                     <?php endif; ?>
                     /></a>
        </figure>
    </div>
    <?php endif; ?>
    <?php if ($content->teaser): ?>
    <div class="text-left"><?php echo $content->escapeForXss('teaser'); ?></div>
    <?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; ?>