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

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