{# hasShadow should not be used for sliders! #}
<section class="img-teaser {{ ratio|default('') == "square" ? 'img-teaser-square' : '' }} {{ isSearchTeaser| default(false) ? 'img-teaser--search': '' }} stretch-link teaser-animation {{ hasShadow | default(null) ? 'img-teaser--has-shadow' : '' }} {{ styleModifier | default(null) }}">
{#
img-teaser-square are used for regions in region-overlay
#}
<div class="{{ ratio|default('') == "square" or isInNav|default(null) or ratio|default('') == "square-big" ? 'embed-responsive-1by1' : 'img-teaser__embed ' }} embed-responsive">
{% set thumb = ratio ? 'img-teaser-' ~ ratio : 'img-teaser' %}
{% if not isAdditionalLink | default(false) %}
{% set description = getImageDescription(image, true) %}
{{ image|default(null) ? image.thumbnail(isInNav|default(null) ? 'img-teaser--nav' : thumb ).html({
imgAttributes: {
class: 'js-lazy-img embed-responsive-item teaser-animation__img'
},
lowQualityPlaceholder: true,
title: description|default(''),
alt: description|default('')
}) |raw : '' }}
{% else %}
<div class="embed-responsive-item teaser-animation__img bg-primary-light"></div>
{% endif %}
{% do jsConfig().add('lazyImg', true) %}
</div>
<div class="img-teaser__content">
<div>
{% if badgeText|default('') %}
<div class="img-teaser__badge {{ badgeWhite | default(false) ? 'img-teaser__badge--white' : '' }}">
{{ badgeText|default('') }}
</div>
{% endif %}
<{{ isInNav|default(null) ? 'div' : 'h3' }} class="img-teaser__title h5">
{% set description = getImageDescription(image) %}
<a href="{{ href }}" class="stretch-link__link" title="{{ description|default('') }}">
{{ title|default('') }}
</a>
</{{ isInNav|default(null) ? 'div' : 'h3' }}>
{% if text | default(false) %}
<div class="img-teaser__text">
{{ text }}
</div>
{% elseif buttonText | default(false) %}
<a href="{{ href }}" class="btn btn-white btn-block mt-2">
{{ buttonText | default("") }}
</a>
{% endif %}
</div>
</div>
</section>