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