{% from '@openform_front_templates/_includes/_icons.html.twig' import fullscreen, zoomin, zoomout, sliderprev, slidernext, arrowright, copyrights, info, infoClose %}
{% set ImageSlides = entity.ImageSlide|filterVisibles(app.request.locale) %}
<div class="collections__wrapper" style="height: 100%; {% if not entity.showHeader %}height:100vh; {% elseif rootParent is defined and rootParent.headerHeight is defined and rootParent.headerHeight %}height: calc(100vh - {{rootParent.headerHeight}}px);{% else %} height: calc( 100vh - 90px );{% endif %} background:{{entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};">
{% set href = toolkit_route_localizer.generate('relict_pack_item', { 'slug': parentPage.Translation[app.request.locale].slug}, app.request.locale) %}
{% if entity.heightTop is same as(0) %}
{% elseif (entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (parentPage.Translation[app.request.locale].titleHtml is defined and parentPage.Translation[app.request.locale].titleHtml) or (href) %}
<div class="collections__top" style="background-color: {{entity.lineColor|default('#F8F7F0')}}; {% if not entity.showHeader %}padding-top: 111px; height: calc({{entity.heightTop|default('16') }}% + 90px); {% else %} height: {{entity.heightTop|default('16') }}%; {% endif %}">
{% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
<div class="collections__top__title block__h3">
{{ entity.Translation[app.request.locale].titleHtml|raw }}
</div>
{% endif %}
<a class="collections__top__subtitle" href="{{href}}">{{parentPage.Translation[app.request.locale].titleHtml|raw}}</a>
</div>
{% endif %}
{% if ImageSlides|length > 0 %}
<div class="js-collection-gallery-standard" style="height: {% if not entity.showHeader %}calc({% endif %}{{
not((entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (parentPage.Translation[app.request.locale].titleHtml is defined and parentPage.Translation[app.request.locale].titleHtml) or (href) or (entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) or (entity.heightTop is same as(0) and entity.heightBottom is same as(0)) ? 100 :
not((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) or (not entity.heightTop is same as(0) and entity.heightBottom is same as(0) and entity.heightTop == null) ? 100 - 16 :
not((entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (parentPage.Translation[app.request.locale].titleHtml is defined and parentPage.Translation[app.request.locale].titleHtml) or (href)) or (entity.heightTop is same as(0) and not entity.heightBottom is same as(0) and entity.heightBottom == null) ? 100 - 19 :
not ((entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text) or (entity.link is defined and entity.link)) or (entity.heightTop is same as(0) and not entity.heightBottom is same as(0) and entity.heightBottom) ? 100 - entity.heightBottom : not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or entity.Translation[app.request.locale].text or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) or
(not entity.heightTop is same as(0) and entity.heightBottom is same as(0) and entity.heightTop) ? 100 - entity.heightTop :
entity.heightTop and entity.heightBottom ? 100 - entity.heightTop - entity.heightBottom :
entity.heightTop and entity.heightBottom == null ? 100 - 19 - entity.heightTop :
entity.heightTop == null and entity.heightBottom ? 100 - 16 - entity.heightBottom :
65 }}% {% if not entity.showHeader %}- 90px);{% endif %}">
<div class="collections__arrows">
{% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
{% if entity.id == Relict.id %}
{% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
{% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
{% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
<a href="{{href}}" class="slider-nav__btn slider-nav__btn--prev">
{{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
</a>
{% endif%}
{% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
{% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
{% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
<a href="{{href}}" class="slider-nav__btn slider-nav__btn--next">
{{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
</a>
{% endif%}
{% endif %}
{% endfor %}
</div>
<div class="splide js-collections-gallery-o8 collection-gallery" style="height: 100%;">
<div class="splide__track" style="height: 100%;">
<ul class="splide__list" style="height: 100%;">
{% for key, image in ImageSlides %}
{% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
{# {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '', 'temp12') %}
{% set img = openform_front_util.getImagePathByType(image.Thumb ?? '', 'temp12small') %} #}
<li class="splide__slide" style="height: 100%;">
<div class="collection-gallery__item js-openseadragon" style="height: 100%;" data-id="main{{image.id}}viewer" data-navid="nav{{image.id}}viewerv" data-img="{{ img }}" data-toolbarid="tool{{image.id}}bar" data-zoomoutid="zoom{{image.id}}out" data-zoominid="zoom{{image.id}}in">
<style>
#main{{image.id}}viewer{
{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderWidth}}px solid {{image.imageBorderColor}}; {% endif %}
{{image.imageWidth ? 'width:' ~ image.imageWidth ~ '% !important;' : 'width: 100% !important;'}}
{{image.imageHeight ? 'height:' ~ image.imageHeight ~ '% !important;' : 'height: 100% !important;'}}
}
</style>
<div class="main-viewer" id="main{{image.id}}viewer">
</div>
</div>
{% if entity.heightBottom is same as(0) %}
{% endif %}
<div class="navigation-container" {% if entity.heightBottom is same as(0) or not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) %}style="bottom: 16%;"{% endif %}>
<div id="nav{{image.id}}viewerv" class="nav-viewer"></div>
<div id="tool{{image.id}}bar" class="toolbar"></div>
</div>
<style>
.collection-gallery-buttons{{image.id}}{
{% if not image.Translation[app.request.locale].copyrights %}
.object__info--info::before {
right: 166px;
}
{% endif %}
}
</style>
<div class="collection-gallery__buttons collection-gallery-buttons{{image.id}}" {% if entity.heightBottom is same as(0) or not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) %}style="bottom: 9%;"{% endif %}>
{% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
<div class="object__info-wrap">
<button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-info-{{key}}" tabindex="0">{{info(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
<div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
<div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
<button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
</div>
</div>
{% endif %}
{% if image.Translation[app.request.locale].copyrights %}
<div class="object__info-wrap">
<button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-copyright-{{key}}" tabindex="0">{{copyrights(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
<div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
<div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
<button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
</div>
</div>
{% endif %}
<button class="collection-gallery__buttons__btn js-fullscreen" data-alt="{{image.Translation[app.request.locale].alt}}" tabindex="0" data-color="{{image.imageBackgroundColor is defined and image.imageBackgroundColor ? image.imageBackgroundColor }}"
data-image="{{img}}"
data-description="{{image.Translation[app.request.locale].text}}"
data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
data-start="{{key}}"
data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
>
{{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
</button>
<button class="collection-gallery__buttons__btn" id="zoom{{image.id}}out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
<button class="collection-gallery__buttons__btn" id="zoom{{image.id}}in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
</div>
</li>
{% endfor %}
</ul>
<div class="splide__arrows{{ ImageSlides|length < 2 ? ' hide' }}" >
<div class="slider-nav collection-gallery__nav" {% if entity.heightBottom is same as(0) or not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) %}style="bottom: 1%;"{% endif %}>
<button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
{{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
</button>
<button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
{{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
</button>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% if entity.heightBottom is same as(0) %}
{% elseif (entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath)) %}
<div class="collections__bottom" style="background: {{entity.lineColor2|default('#F5DB7B') }}; height: {{entity.heightBottom|default('19') }}%;" data-lenis-prevent>
{% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
<div class="collections__content__text block__text">
{{ entity.Translation[app.request.locale].text|raw }}
</div>
{% endif %}
{% if entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description %}
<div class="collections__content__text block__text">
{{ entity.Translation[app.request.locale].description|raw }}
</div>
{% endif %}
{% if entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText %}
<div class="collections__content__text block__text">
{{ entity.Translation[app.request.locale].attributesText|raw }}
</div>
{% endif %}
{% if entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath) %}
<div class="block-image__image__audio">
<div class="block-audio__player">
<audio controls class="js-audio-player block-audio__inner">
<source src="{{ entity.filePath }}">
Your browser does not support the audio element.
</audio>
</div>
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>