<?php
if($this->width > $this->height) {
    #Querformatbilder
    $ogimage = $this->getImage($this->urlEncode($this->singleSRC), 1200, 630 , 'crop');
}else{
    #Hochformatbilder
    $ogimage = $this->getImage($this->urlEncode($this->singleSRC), 630, 0 , 'proportional');
}
if($ogimage != "") {
    $GLOBALS['og:image'] = $this->Environment->base . $ogimage;
}
?>

<div class="layout_full block<?= $this->class ?>">

  <?php if ($this->hasMetaFields): ?>
    <p class="info"><time datetime="<?= $this->datetime ?>"><?= $this->date ?></time> <?= $this->author ?> <?= $this->commentCount ?></p>
  <?php endif; ?>

  <?php if ($this->hasSubHeadline): ?>
    <div class="subheadline"><?= $this->subHeadline ?></div>
  <?php endif; ?>

  <h1><?= $this->newsHeadline ?></h1>

  <?php if ($this->hasText): ?>
    <?= $this->text ?>
  <?php else: ?>
    <div class="ce_text block">
      <?= $this->teaser ?>
    </div>
  <?php endif; ?>

  <?php if ($this->enclosure): ?>
    <div class="enclosure">
      <?php foreach ($this->enclosure as $enclosure): ?>
        <p><?= Image::getHtml($enclosure['icon'], '', 'class="mime_icon"') ?> <a href="<?= $enclosure['href'] ?>" title="<?= $enclosure['title'] ?>"><?= $enclosure['link'] ?> <span class="size">(<?= $enclosure['filesize'] ?>)</span></a></p>
      <?php endforeach; ?>
    </div>
  <?php endif; ?>

</div>
