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

<!-- Display a list of all content types in teaser view -->
<?php if ($contentObjects): ?>
  <?php foreach ($contentObjects as $content): ?>
    <div class="stream-item clearfix">
	  <div>
		<h3 class="title"><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="image img-fluid" src="<?php echo $content->getCachedImage(150); ?>" 
          <?php if ($content->caption): ?>title="<?php echo $content->escapeForXss('caption'); ?>" 
            alt="<?php echo $content->escapeForXss('caption'); ?>"<?php endif; ?> />
        </a>
        </figure>
      </div>
      <?php endif; ?>
      <?php if ($content->teaser): ?>
        <div class="teaser"><?php echo $content->escapeForXss('teaser'); ?></div>
      <?php endif; ?>
    </div>
	<?php endforeach; ?>
<?php endif; ?>