{% 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 %}
{% include "@openform_front_templates/_blocks_sections/block.html.twig" with { sections: openform_front_util.getSections(entity)|length > 0 ? openform_front_util.getSections(entity):''} %}
{% 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 relict in entity.getVisibleRelicts(app.request.locale) %}
{% set href = toolkit_route_localizer.generate('relict_item',{ slug : relict.Translation[app.request.locale].slug }, app.request.locale) %}
<a class="collection__item" href="{{ href }}">
{% set img = openform_front_util.getImagePathByType(relict.Thumb ?? '','detail') %}
{% if img %}
<img class="collection__item__img" src="{{img}}" alt="{{ relict.Translation[app.request.locale].alt }}">
{% endif %}
{% if relict.Translation[app.request.locale].title %}
<div class="collection__item__title block__h4">{{ relict.Translation[app.request.locale].titleHtml|raw }}</div>
{% endif %}
</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 %}