src/Package/Openform/Front/Templates/RelictPack/_templates/template-o12.html.twig line 1

Open in your IDE?
  1. {% from '@openform_front_templates/_includes/_icons.html.twig' import fullscreen, zoomin, zoomout, sliderprev, slidernext, arrowright, info, copyrights, loupe, info, infoClose %}
  2. {% set ImageSlides = entity.ImageSlide|filterVisibles(app.request.locale) %}
  3. <div class="collections__head" style="background: {{entity.lineColor|default('#231F17') }};{% if not entity.showHeader %}padding-top:90px; height:152px;{% endif %}">
  4.     {% set href1 = toolkit_route_localizer.generate('relict_pack_item', { 'slug': parentPage.Translation[app.request.locale].slug}, app.request.locale) %}       
  5.     <a href="/">{{loupe()}}</a>
  6.     {% if rootParent.isExhibition is defined %}
  7.         {% set href2 = toolkit_route_localizer.generate('exhibition_item', { 'slug': rootParent.Translation[app.request.locale].slug}, app.request.locale) %}    
  8.     {% endif %}
  9.     {% if href2 is defined %}
  10.         <a href="{{href2}}">{{rootParent.Translation[app.request.locale].titleHtml|raw}}</a>
  11.         <span>/</span>
  12.     {% endif %}
  13.     {% if href1 is defined and href1 == not null %}     
  14.         
  15.         <a href="{{href1}}">{{parentPage.Translation[app.request.locale].titleHtml|raw}}</a>
  16.         
  17.     {% endif %}
  18.     
  19.     {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  20.         <span>/</span>
  21.         <span>
  22.             {{ entity.Translation[app.request.locale].titleHtml|raw }}
  23.         </span>
  24.     {% endif %}
  25. </div>
  26. <div class="collections__container" style="{% if not entity.showHeader %}height: calc(100% - 152px); {% else %} height: calc(100% - 62px); {% endif %}">
  27.     <div class="collections__wrapper" style="width: {{ entity.textAreaWidth ? 'calc(100% - ' ~ entity.textAreaWidth ~ '%)' : '35%'}}; background: {{entity.imageBackgroundColor|default('#F8F7F0') }};">
  28.         {% if ImageSlides|length > 0 %}
  29.             <div class="object__gallery__splide collection-gallery js-collection-gallery-standard" style="height: 100%;">
  30.                 <div class="splide js-collections-gallery-o9 collection-gallery__gallery" style="height: 100%;">
  31.                     <div class="splide__track">
  32.                         <ul class="splide__list">
  33.                             {% for key, image in ImageSlides %}
  34.                                 {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '', 'original') %}
  35.                                 {# {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '', 'temp11') %}
  36.                                 {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '', 'list') %} #}
  37.                                 <li class="splide__slide">
  38.                                     <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style=" height: 100%;">
  39.                                         <div class="collection-gallery__item" style="height: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center;">
  40.                                             <div style="{{image.imageWidth ? 'width:' ~ image.imageWidth ~ '%;' : 'width: 100%;'}}
  41.                                                 {{image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : 'height: 100%;'}}
  42.                                                 {{image.imageWidth ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}
  43.                                                 {{image.imageHeight ? 'max-height:' ~ image.imageHeight ~ '%;' : 'max-height: 100%;'}}">
  44.                                                 <style>
  45.                                                     .my-zoomist-{{key}} img{
  46.                                                         {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  47.                                                     }
  48.                                                     .my-zoomist-{{key}} .zoomist-wrapper{
  49.                                                         background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  50.                                                     }
  51.                                                  </style>
  52.                                                 <div class="my-zoomist my-zoomist-{{key}}" data-zoomist-src="{{img}}" data-alt="{{image.Translation[app.request.locale].alt}}" tabindex="0"></div>
  53.                                             </div>
  54.                                         </div>
  55.                                         <div class="collection-gallery__wrap" style="padding: 0;">
  56.                                             <div class="collection-gallery__buttons">
  57.                                                             {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  58.                                                                 <div class="object__info-wrap">
  59.                                                                     <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>
  60.                                                                     <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  61.                                                                         <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  62.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  63.                                                                     </div>
  64.                                                                 </div>
  65.                                                             {% endif %}
  66.                                                             {% if image.Translation[app.request.locale].copyrights %}
  67.                                                                 <div class="object__info-wrap">
  68.                                                                     <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>
  69.                                                                     <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  70.                                                                         <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  71.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  72.                                                                     </div>
  73.                                                                 </div>
  74.                                                             {% endif %}
  75.                                                 <button 
  76.                                                     class="collection-gallery__buttons__btn js-fullscreen" data-alt="{{image.Translation[app.request.locale].alt}}" 
  77.                                                     tabindex="0" 
  78.                                                     data-image="{{ img }}" 
  79.                                                     data-color="{{image.imageBackgroundColor ? image.imageBackgroundColor }}"
  80.                                                     data-description="{{ image.Translation[app.request.locale].text }}" 
  81.                                                     data-copyrights="{{image.Translation[app.request.locale].copyrights}}" 
  82.                                                     data-start="{{ key }}"
  83.                                                     data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  84.                                                 >
  85.                                                     {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  86.                                                 </button>
  87.                                                 <button class="collection-gallery__buttons__btn js-zoom-out">{{ zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale)) }}</button>
  88.                                                 <button class="collection-gallery__buttons__btn js-zoom-in">{{ zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale)) }}</button>
  89.                                             </div>
  90.                                         </div>
  91.                                     </div>
  92.                                 </li>
  93.                             {% endfor %}
  94.                         </ul>
  95.                         <ul class="splide__pagination collection-gallery__pagination"></ul>
  96.                     </div>
  97.                 </div>
  98.             </div>
  99.         {% endif %}
  100.     </div>
  101.     <div class="collections__wrapper" style="width: {{ entity.textAreaWidth|default('65') }}%; background: {{ entity.background|default('#F5DB7B') }};" data-lenis-prevent>
  102.         <div class="collections__wrapper__wrap">
  103.             <div class="collections__content">
  104.                 {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  105.                     <div class="collections__content__title block__h3">
  106.                         {{ entity.Translation[app.request.locale].titleHtml|raw }}
  107.                     </div>
  108.                 {% endif %}
  109.                 
  110.                 {% if entity.link is defined and entity.link %}
  111.                     <a href="{{ entity.link }}" class="block-text__btns__btn button-read-more button-read-more--black">
  112.                         <span>{{ ('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale) }}</span>
  113.                         {{ arrowright() }}
  114.                     </a>
  115.                 {% endif %}
  116.                 {% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
  117.                     <div class="collections__content__text block__text">
  118.                         {{ entity.Translation[app.request.locale].text|raw }}
  119.                     </div>
  120.                 {% endif %}
  121.                 {% if entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath) %}
  122.                     <div class="block-image__image__audio">
  123.                         <div class="block-audio__player">
  124.                             <audio controls class="js-audio-player block-audio__inner">
  125.                                 <source src="{{ entity.filePath }}">
  126.                                 Your browser does not support the audio element.
  127.                             </audio>
  128.                         </div>
  129.                     </div>
  130.                 {% endif %}
  131.                 {% if entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description %}
  132.                     <div class="collections__content__text block__text">
  133.                         {{ entity.Translation[app.request.locale].description|raw }}
  134.                     </div>
  135.                 {% endif %}
  136.                 {% if entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText %}
  137.                     <div class="collections__content__text block__text">
  138.                         {{ entity.Translation[app.request.locale].attributesText|raw }}
  139.                     </div>
  140.                 {% endif %}
  141.             </div>
  142.         </div>
  143.     </div>
  144.     <div class="collections__arrows">
  145.         {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  146.             {% if entity.id == Relict.id  %}
  147.                 {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
  148.                     {% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
  149.                     {% set href = toolkit_route_localizer.generate('relict_item', { slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  150.                     <a href="{{ href }}" class="slider-nav__btn slider-nav__btn--prev">
  151.                         {{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  152.                     </a>
  153.                 {% endif %}
  154.                 {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  155.                     {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  156.                     {% set href = toolkit_route_localizer.generate('relict_item', { slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  157.                     <a href="{{ href }}" class="slider-nav__btn slider-nav__btn--next">
  158.                         {{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  159.                     </a>
  160.                 {% endif %}
  161.             {% endif %}
  162.         {% endfor %}
  163.     </div>
  164. </div>