templates/Renderlet/img-teaser-object.html.twig line 1

Open in your IDE?
  1. <section class="img-teaser {{ ratio | default(false) == "square" ? 'img-teaser-square' : '' }} {{ isSearchTeaser| default(false) ? 'img-teaser--search': '' }} stretch-link teaser-animation {{ hasShadow | default(null) ? 'img-teaser--has-shadow' : '' }} {{ styleModifier | default(null) }}">
  2.     {#
  3.     img-teaser-square are used for regions in region-overlay
  4.     #}
  5.     {% if isYoungStyria|default(false) %}
  6.         <img class="demi-infrastructure-teaser-grid__young-styria-logo" src="/static/img/young-styria/young-styria.jpg">
  7.     {% endif %}
  8.     <div class="{{ ratio | default(false) == "square" or isInNav|default(false) ? 'embed-responsive-1by1' : 'img-teaser__embed ' }} embed-responsive">
  9.         {% set thumb = ratio| default(null) ? 'img-teaser-' ~ ratio : 'img-teaser' %}
  10.         {% if not isAdditionalLink | default(false) and img|default(null) %}
  11.             {% set description = getImageDescription(img) %}
  12.             {{ img.getThumbnail(isInNav|default(false) ? 'img-teaser--nav' : thumb).html({
  13.                 imgAttributes: {
  14.                     class: 'js-lazy-img embed-responsive-item teaser-animation__img',
  15.                     title: description|default(''),
  16.                     alt: description|default('')
  17.                 },
  18.                 lowQualityPlaceholder: true,
  19.             })|raw }}
  20.         {% else %}
  21.             <div class="embed-responsive-item teaser-animation__img bg-primary-light"></div>
  22.         {% endif %}
  23.         {% do jsConfig().add('lazyImg', true) %}
  24.     </div>
  25.     <div class="img-teaser__content">
  26.         <div>
  27.             {% if badgeText|default('') %}
  28.                 <div class="img-teaser__badge">
  29.                     {{ badgeText }}
  30.                 </div>
  31.             {% endif %}
  32.             <{{ isInNav|default(false) ? 'div' : 'h3' }} class="img-teaser__title h5">
  33.             <a href="{{ href|default('#') }}" class="stretch-link__link" title="{{ description|default('') }}">
  34.                 {{ title|default('') }}
  35.             </a>
  36.         </{{ isInNav|default(false) ? 'div' : 'h3' }}>
  37.     </div>
  38.     </div>
  39. </section>