src/Package/Openform/Front/Templates/RelictPack/_templates/template-t1.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, arrowBtn, info, infoClose %}
  2. {% set ImageSlides = entity.ImageSlide|filterVisibles(app.request.locale) %}
  3. <div class="collections__wrapper" style="background: {{entity.background|default('#F5DB7B') }}; width: {{entity.textAreaWidth|default('41')}}%;" data-lenis-prevent>
  4.     <div class="collections__content">
  5.                 
  6.         {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  7.             <div class="collections__content__title block__h3">
  8.                 {{ entity.Translation[app.request.locale].titleHtml|raw }}
  9.             </div>
  10.         {% endif %}
  11.         {% if entity.link is defined and entity.link %}
  12.             <a href="{{entity.link}}" class="block-text__btns__btn button-read-more button-read-more--black">
  13.                 <span>{{('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale)}}</span>
  14.                 {{arrowright()}}
  15.             </a>
  16.         {% endif %}
  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.         <div class="collections__content__btns" style="background: {{entity.background|default('#F5DB7B') }};">
  44.             {% if rootParent and entity.exhibitionHomeButtonVisible %}
  45.                 {% set href = toolkit_route_localizer.generate('exhibition_item',{ 'slug' : rootParent.Translation[app.request.locale].slug }, app.request.locale) %}
  46.                 <a href="{{ href }}" class="collections__content__link">
  47.                     Strona główna wystawy
  48.                 </a>
  49.             {% endif %}
  50.             {% if entity.Translation[app.request.locale].buttonNext %}
  51.                 {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  52.                     {% if entity.id == Relict.id  %}
  53.                         {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  54.                             {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  55.                             {% set href = toolkit_route_localizer.generate('relict_item', { slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  56.                             <a class="collections__content__link-white collections__content__link-white--secondary" href="{{ href }}">
  57.                                 <span>{{ entity.Translation[app.request.locale].buttonNext|raw }}</span>
  58.                                 {{ arrowBtn() }}
  59.                             </a>
  60.                         {% endif%}
  61.                     {% endif %}
  62.                 {% endfor %}
  63.             {% endif %}
  64.         </div>
  65.     </div>
  66. </div>
  67.             
  68.             
  69. <div class="collections__wrapper" style="width: {{entity.textAreaWidth is same as(0) ? '100%' : entity.textAreaWidth ? 'calc(100% - ' ~ entity.textAreaWidth ~ '%)' : '59%'}}; background:{{entity.imageBackgroundColor|default('#F8F7F0') }};">
  70.     <div class="object__gallery__splide collection-gallery js-collection-gallery-standard" style="height: 100%;">
  71.         <div class="splide js-collections-gallery-o8 collection-gallery__gallery" style="height: 100%;">
  72.             <div class="splide__track">
  73.                 
  74.                 
  75.                 <ul class="splide__list" style="height: 100%;">
  76.                     {% for key, image in ImageSlides %}
  77.                         {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  78.                         {# {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  79.                         {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  80.                         <li class="splide__slide" style="height: 100%;">
  81.                             <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="height: 100%; display: flex; justify-content:center; align-items: center;">
  82.                                 <div class="collection-gallery__item" style="{{image.imageWidth ? 'width:' ~ image.imageWidth ~ '%; position: relative; margin: 0 auto;' : 'width: 100%;'}}
  83.                                                 {{image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : 'height: 100%;'}}
  84.                                                 {{image.imageWidth ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}
  85.                                                 {{image.imageHeight ? 'max-height:' ~ image.imageHeight ~ '%;' : 'max-height: 100%;'}}
  86.                                                  ">
  87.                                                 <style>
  88.                                                     .my-zoomist-{{key}} img{
  89.                                                         {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  90.                                                     }
  91.                                                     .my-zoomist-{{key}} .zoomist-wrapper{
  92.                                                         background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  93.                                                     }
  94.                                                  </style>
  95.                                     <div class="my-zoomist my-zoomist-{{key}}"  data-zoomist-src="{{img}}" tabindex="0" data-alt="{{image.Translation[app.request.locale].alt}}"></div>
  96.                                 </div>
  97.                                 <div class="collection-gallery__wrap">
  98.                                     <div class="collection-gallery__content block__text">
  99.                                         {# {{image.Translation[app.request.locale].text ? image.Translation[app.request.locale].text}} #}
  100.                                     </div>
  101.                                     <div class="collection-gallery__buttons">
  102.                                                             {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  103.                                                                 <div class="object__info-wrap">
  104.                                                                     <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>
  105.                                                                     <div class="object__info object__info--info js-info-{{ key }}" data-lenis-prevent>
  106.                                                                         <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  107.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  108.                                                                     </div>
  109.                                                                 </div>
  110.                                                             {% endif %}
  111.                                                             {% if image.Translation[app.request.locale].copyrights %}
  112.                                                                 <div class="object__info-wrap">
  113.                                                                     <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>
  114.                                                                     <div class="object__info object__info--copyright js-copyright-{{ key }}" data-lenis-prevent>
  115.                                                                         <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  116.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  117.                                                                     </div>
  118.                                                                 </div>
  119.                                                             {% endif %}
  120.                                                     <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 }}"
  121.                                                         data-image="{{img}}"
  122.                                                         data-description="{{image.Translation[app.request.locale].text}}"
  123.                                                         data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  124.                                                         data-start="{{ key}}"
  125.                                                         data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  126.                                                     >
  127.                                                     {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  128.                                                     </button>
  129.                                                     <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  130.                                                     <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  131.                                                 </div>
  132.                                 </div>
  133.                             </div>
  134.                         </li>    
  135.                     {% endfor %}                               
  136.                 </ul>
  137.                 <div class="splide__arrows splide__arrows-no-thumbs{{ ImageSlides|length < 2 ? ' hide' }}">
  138.                     <div class="slider-nav collection-gallery__nav">
  139.                         <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  140.                             {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  141.                         </button>
  142.                         <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  143.                             {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  144.                         </button>
  145.                     </div>
  146.                 </div>
  147.             </div>
  148.         </div>
  149.     </div> 
  150. </div>