{% 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="background: {{entity.background|default('#F5DB7B') }}; width: {{entity.textAreaWidth|default('35')}}%;" data-lenis-prevent>
<div class="collections__content">
{% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
<div class="collections__content__title block__h3">
{{ entity.Translation[app.request.locale].titleHtml|raw }}
</div>
{% endif %}
{% if entity.link is defined and entity.link %}
<a href="{{entity.link}}" class="block-text__btns__btn button-read-more button-read-more--black">
<span>{{('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale)}}</span>
{{arrowright()}}
</a>
{% endif %}
{% 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.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 %}
{% 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.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 %}
</div>
</div>
<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="collections__wrapper" style="width: {{entity.textAreaWidth ? 'calc(100% - ' ~ entity.textAreaWidth ~ '%)' : entity.textAreaWidth == 0 ? '100%' : '65%'}}; background:{{entity.imageBackgroundColor|default('#F8F7F0') }}; height: {{entity.galleryColumnHeight|default('100')}}%;">
{% if ImageSlides|length == 1 %}
<div class="object__gallery__splide collection-gallery" style="height: 100%;">
<div class="collection-gallery__gallery" style="height: 100%;">
{% for image in ImageSlides %}
{% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
{% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
{% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %}
<div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="height: 100%;">
<div style="display: flex; justify-content: center; width:100%; {{ image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : entity.showHeader ? 'height: calc(90% - 90px);' : 'height: 90%;' }}">
<div class="collection-gallery__item" style="
{{image.imageWidth == null and image.imageBorderWidth ? 'width: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth ? 'width: calc(' ~ image.imageWidth ~ '% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth == null ? 'width:' ~ image.imageWidth ~ '%;' : 'width: 100%;'}}
{{image.imageBorderWidth ? 'height: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'height: 100%;'}}
{{image.imageBorderWidth ? 'max-height: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'max-height: 100%;'}}
{{image.imageWidth == null and image.imageBorderWidth ? 'max-width: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth ? 'max-width: calc(' ~ image.imageWidth ~ '% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth == null ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}
" >
<div class="my-zoomist" data-zoomist-src="{{img}}" tabindex="0" data-alt="{{image.Translation[app.request.locale].alt}}"></div>
</div>
</div>
<div class="collection-gallery__wrap" style="height:{{image.imageHeight ? 100 - image.imageHeight : 10}}%;">
<div class="collection-gallery__content block__text {{image.imageHeight > 82 ? 'hide'}}" >
{{image.Translation[app.request.locale].text ? image.Translation[app.request.locale].text|raw}}
</div>
<div class="collection-gallery__buttons {{image.imageHeight > 82 ? 'collection-gallery__buttons--max-height'}}" >
{% 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="0"
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 js-zoom-out" tabindex="0">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
<button class="collection-gallery__buttons__btn js-zoom-in" tabindex="0">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% elseif ImageSlides|length > 1 %}
<div class="object__gallery__splide collection-gallery js-collection-gallery-standard" style="height: 100%;">
<div class="splide js-collections-gallery2 collection-gallery__gallery" style="{{ entity.showThumbs ? 'height:' ~ (100 - entity.thumbsHeight|default(21)) ~ '%;' : 'height: 100%;'}}">
<div class="splide__track">
<ul class="splide__list" style="height: 100%;">
{% for key, image in ImageSlides %}
{% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
{# {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
{% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
<li class="splide__slide">
<div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="height: 100%;">
<div style="display: flex; justify-content: center; width:100%;
{{image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : 'height: 90%;'}}
">
<div class="collection-gallery__item" style="
{{image.imageWidth ? 'width:' ~ image.imageWidth ~ '%;' : 'width: 100%;'}}
height: 100%; max-height: 100%;
{{image.imageWidth ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}" >
<style>
.my-zoomist-{{key}} img{
{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
}
.my-zoomist-{{key}} .zoomist-wrapper{
background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
}
</style>
<div class="my-zoomist my-zoomist-{{key}}" data-alt="{{image.Translation[app.request.locale].alt}}" data-zoomist-src="{{img}}" tabindex="0"></div>
</div>
</div>
<div class="collection-gallery__wrap" style="height:{{image.imageHeight ? 100 - image.imageHeight : 10}}%;" data-lenis-prevent>
<div class="collection-gallery__buttons">
{% 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 js-zoom-out" tabindex="0">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
<button class="collection-gallery__buttons__btn js-zoom-in" tabindex="0">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
{% if entity.showThumbs == null %}
<div class="splide__arrows splide__arrows-no-thumbs{{ ImageSlides|length < 2 ? ' hide' }}">
<div class="slider-nav collection-gallery__nav">
<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>
{% endif %}
</div>
</div>
{% if entity.thumbsBackgroundColor %}
<style>
.collection-gallery__navigation .splide__slide.is-active {
border-color: {{entity.thumbsBackgroundColor}};
}
.collection-gallery__navigation .splide__slide.is-active::after{
border-bottom: 34px solid {{entity.thumbsBackgroundColor}};
}
</style>
{% endif %}
<div class="splide js-collections-navigation2 collection-gallery__navigation" style="{{ entity.showThumbs ? 'height:' ~ entity.thumbsHeight|default(21) ~ '%;' : 'height: 0;'}}" data-height="100%}" data-disabled="{{entity.showThumbs ? 'true' : 'false'}}">
<div class="splide__track">
<ul class="splide__list">
{% for image in ImageSlides %}
{% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
{% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
{% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %}
<li class="splide__slide">
<img src="{{img}}" alt="{{image.Translation[app.request.locale].alt ? image.Translation[app.request.locale].alt}}">
</li>
{% endfor %}
</ul>
<div class="splide__arrows{{ ImageSlides|length < 2 ? ' hide' }}">
<div class="slider-nav collection-gallery__nav">
<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 %}
</div>
</div>