{% extends "@openform_front_templates/base.html.twig" %}
{% block bodyAttr %}data-page="detail-page"{% endblock %}
{% set pageSubTitle = entity.Translation[app.request.locale].title %}
{% set metaTitle = entity.Translation[app.request.locale].metaTitle ? entity.Translation[app.request.locale].metaTitle : entity.Translation[app.request.locale].title %}
{% set metaDescription = entity.Translation[app.request.locale].metaDescription %}
{% set metaKeywords = entity.Translation[app.request.locale].metaKeywords %}
{% set pageImage = entity.imagePath ? openform_front_util.getImagePathByType(entity.Thumb,'list') : '' %}
{% block header %}
{% include "@openform_front_templates/_includes/_header_mak.html.twig" with {'langLinks' : (langLinks is defined ? langLinks), item : entity} %}
{% endblock %}
{% block content %}
{% set mobile = openform_front_util.isMobileDevice() %}
{% if mobile %}
<h1 class="index-news__title--mobile">{{ entity.Translation[app.request.locale].titleHtml|raw }}</h1>
{% endif %}
<section class="collection index-news">
<div class="collection__wrapper index-news__wrapper container">
{% if mobile %}
{% else %}
<h1 class="index-news__title--desktop">{{ entity.Translation[app.request.locale].titleHtml|raw }}</h1>
{% endif %}
{% set img = openform_front_util.getImagePathByType(entity.Thumb ?? '','detail') %}
{% if img %}
<img class="collection__img" src="{{img}}" alt="{{ entity.Translation[app.request.locale].alt }}">
{% endif %}
<div class="collection__text block__text">
{{ entity.Translation[app.request.locale].text }}
</div>
<div class="collection__items">
{% for antique in entity.getVisibleAntiques(app.request.locale) %}
{% set href = toolkit_route_localizer.generate('antique_item',{ slug : antique.Translation[app.request.locale].slug }, app.request.locale) %}
<a class="collection__item" href="{{ href }}">
{% set img = openform_front_util.getImagePathByType(antique.Thumb ?? '','detail') %}
{% if img %}
<img class="collection__item__img" src="{{img}}" alt="{{ antique.Translation[app.request.locale].alt }}">
{% endif %}
{% if antique.Translation[app.request.locale].title %}
<div class="collection__item__title block__h4">{{ antique.Translation[app.request.locale].titleHtml|raw }}</div>
{% endif %}
<div class="collection__item__authors block__text block__text-L">
{% for artist in antique.Artist %}
{{artist.fullName}}{{antique.Artist|length > 1 ? '<br>' : ''}}
{% endfor %}
</div>
</a>
{% endfor %}
</div>
</div>
</section>
{% include "@openform_front_templates/_blocks/_all_blocks.html.twig" with { blocks: entity.block } %}
{% include "@openform_front_templates/_includes/_image_slide.html.twig" with { entity: entity } %}
{% endblock %}