{% do jsConfig().add('lazyImg', true) %}
{% set badge = article.topArticle ? (article.getAdvertismentNote() ?: ("magazine.top-article.badge")|trans) : false %}
<div class="hero-magazine content-block {{ styleModifier | default(null) }}">
<figure class="hero-magazine__image embed-responsive hero-magazine__embed--full-width">
{% if article.teaserImage %}
{% set description = getImageDescription(article.teaserImage) %}
{{ article.teaserImage.thumbnail('hero-magazine--full-width').html({
imgAttributes: {
class: 'embed-responsive-item'
},
lowQualityPlaceholder: true,
title: description,
alt: description,
})|raw }}
{{ article.teaserImage.thumbnail('hero-magazine--full-width').html({
imgAttributes: {
class: 'embed-responsive-item'
},
title: description,
alt: description
})|raw }}
{% endif %}
</figure>
<div class="hero-magazine__content-wrapper {{ badge ? 'hero-magazine__content-wrapper--has-badge' : '' }} ">
{% if badge %}
{{ include('Magazine/Includes/triangle-badge.html.twig', {
'text': badge,
'position': 'right',
'styleModifier': ''
}) }}
{% endif %}
<div class="hero-magazine__content">
{% if article.getCategories() and article.getCategories()[0] %}
{% set articleTheme = getThemeByCategoryId(article.getCategories()[0].id) %}
{% if articleTheme %}
<div class="hero-magazine__top-headline">
{{ articleTheme.name }}
</div>
{% endif %}
{% endif %}
<h1 class="js-toc__title hero-magazine__title">
{{ article.title }}
</h1>
{% if article.articleDate or article.readingTime or article.categories is not empty %}
<div class="hero-magazine__info-wrapper">
{% if article.articleDate %}
<time datetime="{{ article.articleDate | date('Y-m-d') }}" class="hero-magazine__date">
{{ article.articleDate | date('d.m.Y') }}
</time>
{% endif %}
{% if article.readingTime or article.categories is not empty %}
<ul class="hero-magazine__additional-infos list-inline">
{% if article.readingTime %}
<li class="hero-magazine__additional-infos__item list-inline-item">
<span class="icon icon-clock" aria-label="{{ 'sr.Lesezeit'|trans }}" title="{{ 'sr.Lesezeit'|trans }}"></span>
{{ article.readingTime }} {{ 'magazine.Minuten Lesezeit' | trans }}
</li>
{% endif %}
{% if article.categories is not empty %}
<li class="hero-magazine__additional-infos__item list-inline-item">
<span class="icon icon-tag" aria-label="{{ 'sr.Kategorie'|trans }}" title="{{ 'sr.Kategorie'|trans }}"></span>
{% for category in article.categories %}
{{ category.name }}{% if not loop.last %}, {% endif %}
{% endfor %}
</li>
{% endif %}
</ul>
{% endif %}
</div>
{% endif %}
{% if article.author %}
<div class="row row--gutter-width-10 hero-magazine__author">
<div class="col-auto">
<div class="embed-responsive embed-responsive-1by1 hero-magazine__author-img-wrapper">
{% if article.author.image %}
{{ article.author.image.thumbnail('hero-magazine__author').html({
imgAttributes: {
class: 'embed-responsive-item js-lazy-img'
},
lowQualityPlaceholder: true,
})|raw }}
{% endif %}
</div>
</div>
<div class="col d-flex align-items-center">
<a href="{{ linkGenerator().generate(article.author) }}" class="hero-magazine__author-title">
{{ ('magazine.author.' ~ article.author.gender) | trans }}: {{ article.author.name }}
</a>
</div>
</div>
{% endif %}
</div>
</div>
</div>