<?php include('include_helper_content.html5'); ?>

<?php
  $isFeature = strpos($custom->classModified, 'is-featured');
?>

<div class="col-12 <?php if($isFeature): ?>col-lg-8 col-xl-6<?php else: ?>col-md-6 col-lg-4 col-xl-3<?php endif ?>">
  <div class="c-cardBackground<?php if ($custom->classModified): ?> <?= $custom->classModified ?><?php endif; ?>" data-theme="light">
    <?php if ($this->addImage): ?>
    <div class="c-cardBackground__media">
      <?php $this->insert('image', $this->arrData); ?>
    </div>
    <?php endif; ?>

    <div class="c-cardBackground__body">
      <div class="c-cardBackground__text">
        <?php if($isFeature): ?><h3><?= $this->linkHeadline ?></h3><?php else: ?><h4><?= $this->linkHeadline ?></h4><?php endif ?>

        <?php if ($this->hasText || $this->hasTeaser): ?>
        <p><a class="o-text-link" href="<?= $this->link ?>"><?= $GLOBALS['TL_LANG']['MSC']['more'] ?></a></p>
        <?php endif; ?>
      </div>

      <?php if ($this->hasText || $this->hasTeaser): ?>
      <a class="c-cardBackground__link" href="<?= $this->link ?>"></a>
      <?php endif; ?>
    </div>

    <?php if ($this->author): ?>
    <div class="c-cardBackground__footer">
      <strong><?= $this->author ?>&ensp;·&ensp;</strong><time datetime="<?= $this->datetime ?>" itemprop="datePublished"><?= date('d.m.Y', $this->time) ?></time>
    </div>
    <?php endif; ?>
  </div>
</div>
