src/Package/Openform/Front/Templates/RelictPack/_templates/template-o1.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('#F5DB7B') }}; width: {{entity.textAreaWidth|default('35')}}%;" data-lenis-prevent>
  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.         {% if entity.link is defined and entity.link %}
  11.                         <a href="{{entity.link}}" class="block-text__btns__btn button-read-more button-read-more--black">
  12.                                 <span>{{('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale)}}</span>
  13.                                 {{arrowright()}}
  14.                         </a>
  15.         {% endif %}
  16.         
  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.         
  44.     </div>
  45. </div> 
  46. <div class="collections__arrows">
  47.     {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  48.                 {% if entity.id == Relict.id  %}
  49.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
  50.                         {% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
  51.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  52.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--prev">
  53.                             {{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  54.                         </a>
  55.                     {% endif%}
  56.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  57.                         {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  58.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  59.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--next">
  60.                             {{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  61.                         </a>
  62.                     {% endif%}
  63.                 {% endif %}
  64.     {% endfor %}
  65. </div>
  66. <div class="collections__wrapper" style="width: {{entity.textAreaWidth ? 'calc(100% - ' ~ entity.textAreaWidth ~ '%)' : entity.textAreaWidth == 0 ? '100%' : '65%'}}; background:{{entity.imageBackgroundColor|default('#F8F7F0') }}; height: {{entity.galleryColumnHeight|default('100')}}%;">
  67.                 {% if ImageSlides|length == 1 %}
  68.                     <div class="object__gallery__splide collection-gallery" style="height: 100%;">
  69.                         <div class="collection-gallery__gallery" style="height: 100%;">
  70.                             {% for image in ImageSlides %}
  71.                                 {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  72.                                 {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  73.                                 {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %}
  74.                                 <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="height: 100%;">
  75.                                                 <div style="display: flex; justify-content: center; width:100%; {{ image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : entity.showHeader ? 'height: calc(90% - 90px);' : 'height: 90%;' }}">
  76.                                                 <div class="collection-gallery__item" style="
  77.                                                 {{image.imageWidth == null and image.imageBorderWidth ? 'width: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth ? 'width: calc(' ~ image.imageWidth ~ '% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth == null ? 'width:' ~ image.imageWidth ~ '%;' : 'width: 100%;'}}
  78.                                                 {{image.imageBorderWidth ? 'height: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'height: 100%;'}}
  79.                                                 {{image.imageBorderWidth ? 'max-height: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'max-height: 100%;'}}
  80.                                                 {{image.imageWidth == null and image.imageBorderWidth ? 'max-width: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth ? 'max-width: calc(' ~ image.imageWidth ~ '% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : image.imageWidth and image.imageBorderWidth == null ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}
  81.                                                  "  >
  82.                                                    <div class="my-zoomist"  data-zoomist-src="{{img}}" tabindex="0" data-alt="{{image.Translation[app.request.locale].alt}}"></div> 
  83.                                                 </div>
  84.                                                     
  85.                                                 </div>
  86.                                                             
  87.                                                 <div class="collection-gallery__wrap" style="height:{{image.imageHeight ? 100 - image.imageHeight : 10}}%;">
  88.                                                     <div class="collection-gallery__content block__text {{image.imageHeight > 82 ? 'hide'}}" >
  89.                                                         {{image.Translation[app.request.locale].text ? image.Translation[app.request.locale].text|raw}}
  90.                                                     </div>
  91.                                                     <div class="collection-gallery__buttons {{image.imageHeight > 82 ? 'collection-gallery__buttons--max-height'}}" >
  92.                                                         {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  93.                                                             <div class="object__info-wrap">
  94.                                                                 <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>
  95.                                                                 <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  96.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  97.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  98.                                                                 </div>
  99.                                                             </div>
  100.                                                         {% endif %}
  101.                                                         {% if image.Translation[app.request.locale].copyrights %}
  102.                                                             <div class="object__info-wrap">
  103.                                                                 <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>
  104.                                                                 <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  105.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  106.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  107.                                                                 </div>
  108.                                                             </div>
  109.                                                         {% endif %}
  110.                                                         <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 }}"
  111.                                                             data-image="{{img}}"
  112.                                                             data-description="{{image.Translation[app.request.locale].text}}"
  113.                                                             data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  114.                                                             data-start="0"
  115.                                                             data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border:{{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  116.                                                         >
  117.                                                         
  118.                                                         
  119.                                                             {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  120.                                                         </button>
  121.                                                         <button class="collection-gallery__buttons__btn js-zoom-out" tabindex="0">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  122.                                                         <button class="collection-gallery__buttons__btn js-zoom-in" tabindex="0">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  123.                                                     </div>
  124.                                                 </div>
  125.                                             </div>
  126.                             {% endfor %}
  127.                         </div>
  128.                     </div>
  129.                 {% elseif ImageSlides|length > 1 %}
  130.                     <div class="object__gallery__splide collection-gallery js-collection-gallery-standard" style="height: 100%;">
  131.                         
  132.                         <div class="splide js-collections-gallery2 collection-gallery__gallery" style="{{ entity.showThumbs ? 'height:' ~ (100 - entity.thumbsHeight|default(21)) ~ '%;' : 'height: 100%;'}}">
  133.                             <div class="splide__track">
  134.                                 <ul class="splide__list" style="height: 100%;">
  135.                                     {% for key, image in ImageSlides %}
  136.                                         {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  137.                                         {# {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  138.                                         {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  139.                                         <li class="splide__slide">
  140.                                             <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="height: 100%;">
  141.                                                 <div style="display: flex; justify-content: center; width:100%; 
  142.                                                  {{image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : 'height: 90%;'}}
  143.                                                 ">
  144.                                                 <div class="collection-gallery__item" style="
  145.                                                 {{image.imageWidth  ? 'width:' ~ image.imageWidth ~ '%;' : 'width: 100%;'}}
  146.                                                 height: 100%; max-height: 100%;
  147.                                                 {{image.imageWidth ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}" >
  148.                                                  <style>
  149.                                                     .my-zoomist-{{key}} img{
  150.                                                         {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  151.                                                     }
  152.                                                     .my-zoomist-{{key}} .zoomist-wrapper{
  153.                                                         background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  154.                                                     }
  155.                                                  </style>
  156.                                                    <div class="my-zoomist my-zoomist-{{key}}" data-alt="{{image.Translation[app.request.locale].alt}}"  data-zoomist-src="{{img}}" tabindex="0"></div> 
  157.                                                 </div>
  158.                                                     
  159.                                                 </div>
  160.                                                             
  161.                                                 <div class="collection-gallery__wrap" style="height:{{image.imageHeight ? 100 - image.imageHeight : 10}}%;" data-lenis-prevent>
  162.                                                     <div class="collection-gallery__buttons">
  163.                                                         
  164.                                                         {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  165.                                                             <div class="object__info-wrap">
  166.                                                                 <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>
  167.                                                                 <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  168.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  169.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  170.                                                                 </div>
  171.                                                             </div>
  172.                                                         {% endif %}
  173.                                                         {% if image.Translation[app.request.locale].copyrights %}
  174.                                                             <div class="object__info-wrap">
  175.                                                                 <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>
  176.                                                                 <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  177.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  178.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  179.                                                                 </div>
  180.                                                             </div>
  181.                                                         {% endif %}
  182.                                                         <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 }}"
  183.                                                             data-image="{{img}}"
  184.                                                             data-description="{{image.Translation[app.request.locale].text}}"
  185.                                                             data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  186.                                                             data-start="{{key}}"
  187.                                                                         data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  188.                                                         >
  189.                                                             {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  190.                                                         </button>
  191.                                                         <button class="collection-gallery__buttons__btn js-zoom-out" tabindex="0">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  192.                                                         <button class="collection-gallery__buttons__btn js-zoom-in" tabindex="0">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  193.                                                     </div>
  194.                                                 </div>
  195.                                             </div>
  196.                                         </li>
  197.                                     {% endfor %}                               
  198.                                 </ul>
  199.                                 {% if entity.showThumbs == null %}
  200.                                     <div class="splide__arrows splide__arrows-no-thumbs{{ ImageSlides|length < 2 ? ' hide' }}">
  201.                                         <div class="slider-nav collection-gallery__nav">
  202.                                             <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  203.                                                 {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  204.                                             </button>
  205.                                             <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  206.                                                 {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  207.                                             </button>
  208.                                         </div>
  209.                                     </div>
  210.                                 {% endif %}
  211.                             </div>
  212.                         </div>
  213.                         {% if entity.thumbsBackgroundColor %}
  214.                             <style>
  215.                                 .collection-gallery__navigation .splide__slide.is-active {
  216.                                     border-color: {{entity.thumbsBackgroundColor}};
  217.                                 }
  218.                                 .collection-gallery__navigation .splide__slide.is-active::after{
  219.                                     border-bottom: 34px solid {{entity.thumbsBackgroundColor}};
  220.                                 }   
  221.                             </style>
  222.                         {% endif %}
  223.                         <div class="splide js-collections-navigation2 collection-gallery__navigation" style="{{ entity.showThumbs ? 'height:' ~ entity.thumbsHeight|default(21) ~ '%;' : 'height: 0;'}}" data-height="100%}" data-disabled="{{entity.showThumbs ? 'true' : 'false'}}">
  224.                             <div class="splide__track">
  225.                                 <ul class="splide__list">
  226.                                     {% for image in ImageSlides %}
  227.                                         {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  228.                                         {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  229.                                         {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %}
  230.                                         <li class="splide__slide">
  231.                                             <img src="{{img}}" alt="{{image.Translation[app.request.locale].alt ? image.Translation[app.request.locale].alt}}">
  232.                                         </li>    
  233.                                     {% endfor %}                               
  234.                                 </ul>
  235.                                 <div class="splide__arrows{{ ImageSlides|length < 2 ? ' hide' }}">
  236.                                     <div class="slider-nav collection-gallery__nav">
  237.                                         <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  238.                                             {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  239.                                         </button>
  240.                                         <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  241.                                             {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  242.                                         </button>
  243.                                     </div>
  244.                                 </div>
  245.                             </div>
  246.                         </div>
  247.                     </div>
  248.                 {% endif %}
  249. </div>
  250. </div>