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

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