src/Package/Openform/Front/Templates/RelictPack/_templates/template-t3.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('transparent') }}; width: {{entity.textAreaWidth ? entity.textAreaWidth ~'%' : 'fit-content'}}; height: {{entity.heightTop is same as(0) ? 0 : entity.heightTop ? entity.heightTop ~'%' : 'fit-content'}}; {{ not entity.showHeader ? 'top: 90px;' }}" >
  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.         
  11.         
  12.         {% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
  13.             <div class="collections__content__text block__text">
  14.                 {{ entity.Translation[app.request.locale].text|raw }}
  15.             </div>
  16.         {% endif %}
  17.        
  18.         
  19.         
  20.         
  21.         
  22.     </div>
  23. </div> 
  24. <div class="collections__content__links">
  25. {% if rootParent and entity.exhibitionHomeButtonVisible %}
  26.                 {% set href = toolkit_route_localizer.generate('exhibition_item',{ 'slug' : rootParent.Translation[app.request.locale].slug }, app.request.locale) %}
  27.                 <a href="{{ href }}" class="collections__content__link">
  28.                     Strona główna wystawy
  29.                 </a>
  30. {% endif %}
  31. {% if entity.Translation[app.request.locale].buttonNext %}
  32.             {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  33.                 {% if entity.id == Relict.id  %}
  34.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  35.                         {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  36.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  37.                         <a href="{{href}}" class="collections__content__link collections__content__link--secondary">
  38.                             <span>{{ entity.Translation[app.request.locale].buttonNext|raw }}</span>
  39.                             {{ arrowright() }}
  40.                         </a>
  41.                     {% endif%}
  42.                 {% endif %}
  43.             {% endfor %}
  44.         {% endif %}
  45. </div>
  46. <div class="collections__wrapper" style="width: 100%; background:{{entity.imageBackgroundColor|default('#F8F7F0') }}; height: 100%;">
  47.                 
  48.                     <div class="object__gallery__splide collection-gallery js-collection-gallery-standard" style="height: 100%;">
  49.                         
  50.                         <div class="splide js-collections-gallery-o8 collection-gallery__gallery" style="height: 100%;">
  51.                             <div class="splide__track">
  52.                                 <ul class="splide__list" style="height: 100%;">
  53.                                     {% for key, image in ImageSlides %}
  54.                                         {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  55.                                         {# {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  56.                                         {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  57.                                         <li class="splide__slide" style="height: 100%;">
  58.                                             <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="height: 100%; display: flex; justify-content:center; align-items: center;">
  59.                                                 <div class="collection-gallery__item" style="{{image.imageWidth ? 'width:' ~ image.imageWidth ~ '%; position: relative; margin: 0 auto;' : 'width: 100%;'}}
  60.                                                 {{image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : 'height: 100%;'}}
  61.                                                 {{image.imageWidth ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}
  62.                                                 {{image.imageHeight ? 'max-height:' ~ image.imageHeight ~ '%;' : 'max-height: 100%;'}}
  63.                                                  ">
  64.                                                 <style>
  65.                                                     .my-zoomist-{{key}} img{
  66.                                                         {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  67.                                                     }
  68.                                                     .my-zoomist-{{key}} .zoomist-wrapper{
  69.                                                         background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  70.                                                     }
  71.                                                  </style>
  72.                                                     <div class="my-zoomist my-zoomist-{{key}}" data-alt="{{image.Translation[app.request.locale].alt}}"  data-zoomist-src="{{img}}" tabindex="0"></div>
  73.                                                 </div>
  74.                                                             
  75.                                                 <div class="collection-gallery__wrap">
  76.                                                     <div class="collection-gallery__content block__text">
  77.                                                         {# {{image.Translation[app.request.locale].text ? image.Translation[app.request.locale].text}} #}
  78.                                                     </div>
  79.                                                     <div class="collection-gallery__buttons">
  80.                                                             {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  81.                                                                 <div class="object__info-wrap">
  82.                                                                     <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>
  83.                                                                     <div class="object__info object__info--info js-info-{{ key }}" data-lenis-prevent>
  84.                                                                         <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  85.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  86.                                                                     </div>
  87.                                                                 </div>
  88.                                                             {% endif %}
  89.                                                             {% if image.Translation[app.request.locale].copyrights %}
  90.                                                                 <div class="object__info-wrap">
  91.                                                                     <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>
  92.                                                                     <div class="object__info object__info--copyright js-copyright-{{ key }}" data-lenis-prevent>
  93.                                                                         <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  94.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  95.                                                                     </div>
  96.                                                                 </div>
  97.                                                             {% endif %}
  98.                                                     <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 }}"
  99.                                                         data-image="{{img}}"
  100.                                                         data-description="{{image.Translation[app.request.locale].text}}"
  101.                                                         data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  102.                                                         data-start="{{ key}}"
  103.                                                         data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  104.                                                     >
  105.                                                     {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  106.                                                     </button>
  107.                                                     <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  108.                                                     <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  109.                                                 </div>
  110.                                                 </div>
  111.                                             </div>
  112.                                             
  113.                                         </li>    
  114.                                         
  115.                                     {% endfor %}                               
  116.                                 </ul>
  117.                                 
  118.                                 <div class="splide__arrows splide__arrows-no-thumbs{{ ImageSlides|length < 2 ? ' hide' }}">
  119.                                     <div class="slider-nav collection-gallery__nav">
  120.                                         <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  121.                                             {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  122.                                         </button>
  123.                                         <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  124.                                             {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  125.                                         </button>
  126.                                     </div>
  127.                                 </div>
  128.                             </div>
  129.                         </div>
  130.                      
  131. </div> 
  132.                          
  133. </div>