govcms-2.x-dev/modules/deprecated/govcms8_foundations/modules/govcms8_layouts/templates/viewmode_layouts/teaser.html.twig
modules/deprecated/govcms8_foundations/modules/govcms8_layouts/templates/viewmode_layouts/teaser.html.twig
{#
/**
* Teaser view mode with image.
*
* List of regions: title, info, summary, tags, image.
*/
#}
{%
set classes = [
'teaser',
'teaser--medium',
]
%}
<div {{ attributes.addClass(classes) }}>
{{ title_suffix.contextual_links }}
{% block content %}
{% if content %}
<div class="teaser__content">
{% block title %}
{% if content.title|render|striptags|trim %}
<h3 class="teaser__title">
{{ content.title }}
</h3>
{% endif %}
{% endblock %}
{% block info %}
{% if content.info|render|striptags|trim %}
<div class="teaser__info">
{{ content.info }}
</div>
{% endif %}
{% endblock %}
{% block summary %}
{% if content.summary|render|striptags|trim %}
<div class="teaser__summary">
{{ content.summary }}
</div>
{% endif %}
{% endblock %}
{% block tags %}
{% if content.tags|render|striptags|trim %}
<div class="teaser__tags">
{{ content.tags }}
</div>
{% endif %}
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% block image %}
{% if content.image|render|striptags('<img>')|trim %}
<div class="teaser__image">
{{ content.image }}
</div>
{% endif %}
{% endblock %}
</div>
