{% set styleModifier = styleModifier | default('') %}
{% set textOnly = textOnly|default(false) %}
{% set cols = cols|default(1) %}
{% set event = event ?? null %}
<div class="image-teaser{{ textOnly ? ' image-teaser--text' : '' }}{{ cols == 1 ? '' : ' image-teaser--' ~ cols ~ 'col' }}{{ styleModifier ? ' ' ~ styleModifier : '' }} stretch-link" {{ editmode and textOnly ? 'style="height: 500px;"' : '' }}
{% if event %}
data-event-tracking-event="{{ event }}"
data-event-tracking-click_item="{{ title }}"
data-event-tracking-click_page_location="{{ href }}"
{% endif %}>
<div class="image-teaser__container">
{% if textOnly|default(false) %}
<div class="image-teaser__text">
<a class="stretch-link__link" href="{{ href|default('#') }}">{{ title }}</a>
{% if button|default(false) %}
<div><a href="#" class="btn btn-primary mt-4">{{ button }}</a></div>
{% endif %}
</div>
<div class="image-teaser__arrow" aria-hidden="true">
<div class="icon icon-arrow" aria-hidden="true"></div>
</div>
{% else %}
{% if image|default(null) %}
<div class="image-teaser__image ratio">
{{ image.thumbnail('image-teaser' ~ (cols == 1 ? '' : '-' ~ cols ~ 'col')).html({
imgAttributes:{
class:'js-lazy-img ratio-item'
},
lowQualityPlaceholder:true
})|raw }}
</div>
{% endif %}
<div class="image-teaser__gradient"></div>
<div class="image-teaser__body">
<div class="image-teaser__body-inner">
{% if date|default(null) or author|default(null) %}
<ul class="image-teaser__list">
{% if date|default(null) %}<li>{{ date.formatLocalized('%d. %B %Y') }}</li>{% endif %}
{% if author|default(null) %}<li>{{ author }}</li>{% endif %}
</ul>
{% endif %}
<div class="image-teaser__supline">{{ suptitle|default('') }}</div>
<{{ teaserTitleTag|default('h3') }} class="image-teaser__headline">
<a class="stretch-link__link" href="{{ href|default('#') }}" target="{{ target|default("_self") }}">{{ title }}</a>
</{{ teaserTitleTag|default('h3') }}>
</div>
</div>
{% endif %}
</div>
</div>