system/modules/pct_theme_templates/templates/modules/mod_pageimage.html5 line 3

Open in your IDE?
  1. <?php
  2. $GLOBALS['TL_CSS'][] = \Contao\Config::get('uploadPath').'/cto_layout/css/modules/mod_pageimage.css|static';
  3. $hasImage = isset($this->picture['img']['src']);
  4. ?>
  5. <?php if( $hasImage ): ?>
  6. <?php // responsive images
  7. $arrMediaQueries = array();
  8. if( \is_array($this->picture['sources']) )
  9. {
  10.   foreach($this->picture['sources'] as $data)
  11.   {
  12.     if( strlen($data['media']) < )
  13.     {
  14.       continue;
  15.     }
  16.     $arrMediaQueries[] = '@media '.$data['media'].' { .mod_pageimage .resp_'.$this->id.' { background-image:url('.$data['src'].') !important; } }';
  17.   }
  18. }
  19. if( count($arrMediaQueries) > )
  20. {
  21.   $GLOBALS['TL_HEAD'][] = '<style>'.implode("\n",$arrMediaQueries).'</style>';
  22. }
  23. ?>
  24. <?php $this->extend('block_unsearchable'); ?>
  25. <?php $this->block('content'); ?>
  26. <div class="inside resp_<?= $this->id?><?php if($this->Page->style_css): ?> <?= $this->Page->style_css?><?php endif; ?><?php if($this->Page->height_css): ?> <?= $this->Page->height_css?><?php endif; ?><?php if($this->bgposition): ?> <?= $this->bgposition?><?php endif; ?>" style="background-image: url('<?= $this->picture['img']['src']; ?>')">
  27.   <div class="container">
  28.     <div class="content">
  29.       <?php if($this->Page->imgHeadline): ?><div class="headline"><?= $this->Page->imgHeadline?></div><?php endif; ?>
  30.       <?php if($this->Page->imgSubheadline): ?><div class="subheadline"><?= $this->Page->imgSubheadline?></div><?php endif; ?>
  31.     </div>
  32.   </div>
  33. </div>
  34. <?php endif; ?>
  35. <?php if($hasImage): ?>
  36. <?php $this->endblock(); ?>
  37. <?php endif; ?>