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

<?php
  // $isMinimal = is set by news_latest_gridTextMinimal.html5
  $isFeature = strpos($custom->classModified, 'is-featured');
?>

<div class="col-12 <?php if($isFeature): ?>col-lg-8<?php else: ?>col-md-6 col-lg-4<?php endif ?>">
  <div class="c-newsTeaser<?php if ($custom->classModified): ?> <?= $custom->classModified ?><?php endif; ?>">
    <?php if ($this->addImage): ?>
    <div class="c-newsTeaser__media">
      <div class="u-unroot@xs-down">
        <?php $this->insert('image', $this->arrData); ?>
      </div>
    </div>
    <?php endif; ?>

    <div class="c-newsTeaser__body">
      <div class="c-newsTeaser__text">
        <?php if ($this->author): ?>
        <div class="c-newsTeaser__meta">
          <strong><?= $this->author ?>&ensp;·&ensp;</strong><time datetime="<?= $this->datetime ?>" itemprop="datePublished"><?= date('d.m.Y', $this->time) ?></time>
        </div>
        <?php endif; ?>
    
        <?php if($isFeature): ?><h3><?= $this->linkHeadline ?></h3><?php else: ?><h4><?= $this->linkHeadline ?></h4><?php endif ?>

        <?php if(!isset($isMinimal)): ?>
        <div class="c-newsTeaser__description" itemprop="description"><?= $this->teaser ?></div>
        <?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>
    </div>
  </div>
</div>
