<article class="product-category-teaser stretch-link shadow border-radius-8">
{% if categoryTeaser.image is not empty %}
<div class="product-category-teaser__img-container">
<div class="ratio ratio-4x3">
{{ categoryTeaser.image.thumbnail('product-category').getHtml({
imgAttributes: {
class: 'ratio-item js-lazy-img product-category__img',
},
lowQualityPlaceholder: true,
})|raw }}
</div>
</div>
{% endif %}
<div class="product-category-teaser__content">
{% set link = '#' %}
{% set description = '' %}
{% if categoryTeaser.relation %}
{% set link = categoryTeaser.relation.fullpath %}
{% set description = categoryTeaser.teaserDescription ?: categoryTeaser.description %}
{% endif %}
{% if categoryTeaser.countryRelations %}
{% for blockElement in categoryTeaser.countryRelations %}
{% if blockElement.config.data and blockElement.config.data.country == siteConfig().country %}
{% if blockElement.countryRelation.data %}
{% set link = blockElement.countryRelation.data.fullpath %}
{% endif %}
{% if blockElement.countryTeaserDescription.data %}
{% set description = blockElement.countryTeaserDescription.data %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
<h3 class="category-teaser__link">
<span class="text-gradient-primary category-teaser__category">
<a href="{{ link }}"
class="stretch-link__link d-flex align-items-center justify-content-between w-100">
{{ categoryTeaser.getDisplayTitle() ?: categoryTeaser.getTitle() }}
</a>
</span>
<span aria-hidden="true" class="icon icon-arrow"></span>
</h3>
{% if description is defined and description is not empty %}
<div class="category-teaser__info">{{ description|raw }}</div>
{% endif %}
</div>
</article>