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

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