templates/includes/blocks/teaser.html.twig line 1
{% set propertyName = propertyName|default('blocks') %}
{% set count = content.teaser_list|length %}
<div class="teaser-wrapper teaser-{{ content.teaser_design|default('blue') }}">
{% if parent.type is not defined %}
{% endif %}
<div class="grid-x small-up-1
{% if count > 1 %}large-up-2{% endif%}
{% if count > 2 %}large-up-3{% endif%}
{% if count > 3 %}large-up-4{% endif%}
g-4
{{ (parent.column_alignment_left is not defined and parent.column_alignment_right is not defined) ? " mb-3" : "" }}">
{% for teaser in content.teaser_list %}
<div class="cell">
<div class="teaser card grid-y align-middle align-justify bg-{{ content.teaser_design|default('blue') }}">
{% if teaser.headline or teaser.subline %}
<div class="card-body grid-y align-middle align-top">
{% if teaser.image %}
{% set media = sulu_resolve_media(teaser.image, app.request.locale) %}
<img src="{{ media.thumbnails[(teaser.image_format) ? teaser.image_format : "square"] }}"
class="card-img-top {{ (teaser.image_format == "icon") ? "svgimage" : "" }} image-{{ content.teaser_design|default('blue') }}"
{% autoescape false %}alt="{{ teaser.headline|default('')|pipe|nl2br|hyphenate }}"{% endautoescape %}
{% if teaser.image_format == "icon" %}style='max-width: 100px;'{% endif %}
{% if teaser.image_format == "squarehalf" %}style='max-width: 50%;'{% endif %}
/>
{% endif %}
{% autoescape false %}
{% if teaser.subline %}
<h6 class="card-title my-3">{{ teaser.subline|default('')|pipe|nl2br|hyphenate }}</h6>
{% endif %}
{% if teaser.headline %}
<h5 class="mb-0">{{ teaser.headline|default('')|pipe|nl2br|hyphenate }}</h5>
{% endif %}
{% endautoescape %}
{% if teaser.text %}
<div class="{{ (teaser.link) ? 'pb-3' : '' }} text-center">
{{ teaser.text|raw }}
</div>
{% endif %}
</div>
{% endif %}
{% if teaser.link or teaser.text %}
<div class="card-footer bg-{{ content.teaser_design|default('blue') }}">
{% if teaser.link %}
<a class="button-wrapper pt-0" href="{{ teaser.link }}" target="{{ view.teaser_list[loop.index0].link.target|default("_self") }}" rel="{{ view.teaser_list[loop.index0].link.provider|default("page") }}">
<span class="btn btn-primary">
{{ view.teaser_list[loop.index0].link.title|default("Mehr erfahren") }}
</span>
</a>
{% endif %}
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% if parent.type is not defined %}
{% endif %}
</div>