src/Package/Openform/Front/Templates/RelictPack/_templates/template-o6.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="js-collection-gallery-standard">
  4.     <div class="collections__container" style="{% if not entity.showHeader %}height:100vh; {% else %} height: calc( 100vh - 89px );{% endif %}">
  5.         <div class="collections__container__wrapper" style="height: calc(100% - {{entity.showThumbs ? (entity.thumbsHeight ? entity.thumbsHeight ~ '%' : '20%') : '0%)'}}">
  6.             <div class="collections__wrapper" style="background: {{entity.background|default('#F5DB7B') }}; 
  7.             {% if (entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or  (entity.link is defined and entity.link) or (entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) %}
  8.                 width: {{entity.textAreaWidth|default('35')}}%;
  9.             {% else %}
  10.                 width: 0;
  11.             {% endif %}            
  12.             {% if not entity.showHeader %}padding-top: 91px;{% endif %}" data-lenis-prevent>
  13.                 <div class="collections__content">
  14.                     
  15.                     {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  16.                         <div class="collections__content__title block__h3">
  17.                             {{ entity.Translation[app.request.locale].titleHtml|raw }}
  18.                         </div>
  19.                     {% endif %}
  20.                     
  21.                     {% if entity.link is defined and entity.link %}
  22.                             <a href="{{entity.link}}" class="block-text__btns__btn button-read-more button-read-more--black">
  23.                                 <span>{{('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale)}}</span>
  24.                                 {{arrowright()}}
  25.                             </a>
  26.                     {% endif %}
  27.                     {% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
  28.                         <div class="collections__content__text block__text">
  29.                             {{ entity.Translation[app.request.locale].text|raw }}
  30.                         </div>
  31.                     {% endif %}
  32.                     
  33.                     
  34.                     {% if entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText %}
  35.                         <div class="collections__content__text block__text">
  36.                             {{ entity.Translation[app.request.locale].attributesText|raw }}
  37.                         </div>
  38.                     {% endif %}
  39.                     
  40.                     
  41.                 </div>
  42.             </div> 
  43.             <div class="collections__arrows">
  44.                 {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  45.                 {% if entity.id == Relict.id  %}
  46.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
  47.                         {% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
  48.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  49.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--prev">
  50.                             {{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  51.                         </a>
  52.                     {% endif%}
  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 href="{{href}}" class="slider-nav__btn slider-nav__btn--next">
  57.                             {{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  58.                         </a>
  59.                     {% endif%}
  60.                 {% endif %}
  61.     {% endfor %}
  62.             </div>
  63.             <div class="collections__wrapper" style="
  64.             {% if (entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or  (entity.link is defined and entity.link) or (entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) %}
  65.                 width: {{entity.textAreaWidth ? 'calc(100% - ' ~ entity.textAreaWidth ~ '%)' : '65%'}};
  66.             {% else %}
  67.                 width: 100%;
  68.             {% endif %} 
  69.              background:{{entity.imageBackgroundColor|default('#F8F7F0') }};">
  70.                             {% if ImageSlides|length > 0 %}
  71.                                 
  72.                                 
  73.                                     
  74.                                     <div class="splide js-collections-gallery2 collection-gallery__gallery" style="height: 100%;">
  75.                                         <div class="splide__track">
  76.                                             <ul class="splide__list">
  77.                                                 {% for key, image in ImageSlides %}
  78.                                                     {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  79.                                                     {# {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  80.                                                     {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  81.                                                     <li class="splide__slide">
  82.                                                         {# <img src="{{img}}" alt="{{image.Translation[app.request.locale].alt ? image.Translation[app.request.locale].alt}}"> #}
  83.                                                         <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="height: 100%; width: 100%;">
  84.                                                             <div style="height: {{not entity.Translation[app.request.locale].description ? '100%' : '90%'}}; position: relative; display: flex; justify-content: center; align-items: center;">
  85.                                                                 
  86.                                                             
  87.                                                                 <div class="collection-gallery__item" style="
  88.                                                                     {{image.imageWidth ? 'width:' ~ image.imageWidth ~ '%;' : 'width: 100%;'}}
  89.                                                                     {{image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : 'height: 100%;'}}
  90.                                                                     {{image.imageWidth ? 'max-width:' ~ image.imageWidth ~ '%;' : 'max-width: 100%;'}}
  91.                                                                     {{image.imageHeight ? 'max-height:' ~ image.imageHeight ~ '%;' : 'max-height: 100%;'}}
  92.                                                                 ">
  93.                                                                 <style>
  94.                                                                     .my-zoomist-{{key}} img{
  95.                                                                         {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  96.                                                                     }
  97.                                                                     .my-zoomist-{{key}} .zoomist-wrapper{
  98.                                                                         background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  99.                                                                     }
  100.                                                                 </style>
  101.                                                                     <div class="my-zoomist my-zoomist-{{key}}" data-zoomist-src="{{img}}"></div>
  102.                                                                 </div>
  103.                                                             </div>
  104.                                                             
  105.                                                             
  106.                                                             <div class="collection-gallery__wrap" style="{% if entity.Translation[app.request.locale].description %}padding: 0 30px 11px 30px; height:10%; margin-top:10px;{% endif %}">
  107.                                                                 <div class="collection-gallery__content block__text" style="overflow-y: auto; height: 100%;">
  108.                                                                     {{entity.Translation[app.request.locale].description ? entity.Translation[app.request.locale].description|raw}}
  109.                                                                 </div>
  110.                                                                 <div class="collection-gallery__buttons">
  111.                                                                     {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  112.                                                                         <div class="object__info-wrap">
  113.                                                                             <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>
  114.                                                                             <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  115.                                                                                 <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  116.                                                                                 <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  117.                                                                             </div>
  118.                                                                         </div>
  119.                                                                     {% endif %}
  120.                                                                     {% if image.Translation[app.request.locale].copyrights %}
  121.                                                                         <div class="object__info-wrap">
  122.                                                                             <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>
  123.                                                                             <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  124.                                                                                 <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  125.                                                                                 <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  126.                                                                             </div>
  127.                                                                         </div>
  128.                                                                     {% endif %}
  129.                                                                     <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 }}"
  130.                                                                         data-image="{{img}}"
  131.                                                                         data-description="{{image.Translation[app.request.locale].text}}"
  132.                                                                         data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  133.                                                                         data-start="{{key}}"
  134.                                                                         data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  135.                                                                     >
  136.                                                                         {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  137.                                                                     </button>
  138.                                                                     <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  139.                                                                     <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  140.                                                                 </div>
  141.                                                             </div>
  142.                                                         </div>
  143.                                                     </li>    
  144.                                                     
  145.                                                 {% endfor %}                               
  146.                                             </ul>
  147.                                             {% if entity.showThumbs == null %}
  148.                                             
  149.                                             <div class="splide__arrows splide__arrows-no-thumbs{{ ImageSlides|length < 2 ? ' hide' }}">
  150.                                                 <div class="slider-nav collection-gallery__nav collection-gallery__nav-sub">
  151.                                                     <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  152.                                                         {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  153.                                                     </button>
  154.                                                     <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  155.                                                         {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  156.                                                     </button>
  157.                                                 </div>
  158.                                             </div>
  159.                                             {% endif %}
  160.                                             {% if entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath) %}
  161.                                                 <div class="block-image__image__audio">
  162.                                                     <div class="block-audio__player">
  163.                                                         <audio controls class="js-audio-player block-audio__inner">
  164.                                                             <source src="{{ entity.filePath }}">
  165.                                                             Your browser does not support the audio element.
  166.                                                         </audio>
  167.                                                     </div>
  168.                                                 </div>
  169.                                             {% endif %}
  170.                                         </div>
  171.                                     </div>
  172.                                     
  173.                                 
  174.                             {% endif %}
  175.                             {% if entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description %}
  176.                                 <div class="collections__content-image block__text" style="background: {{entity.background|default('#F5DB7B') }}; height: 20%;" data-lenis-prevent>
  177.                                     {{ entity.Translation[app.request.locale].description|raw }}
  178.                                 </div>
  179.                             {% endif %}
  180.             </div> 
  181.                             
  182.         </div>
  183.                             {% if entity.thumbsBackgroundColor %}
  184.                                 <style>
  185.                                     .collection-gallery__navigation .splide__slide.is-active {
  186.                                         border-color: {{entity.thumbsBackgroundColor}};
  187.                                     }
  188.                                     .collection-gallery__navigation .splide__slide.is-active::after{
  189.                                         border-bottom: 34px solid {{entity.thumbsBackgroundColor}};
  190.                                     }   
  191.                                 </style>
  192.                             {% endif %}
  193.                             
  194.                             <div style="height: {{entity.showThumbs ? (entity.thumbsHeight ? entity.thumbsHeight ~ '%' : '20%') : 0}}; background-color: {{entity.sliderThumbsBackgroundColor}};">
  195.                                 
  196.                             
  197.                             <div class="splide js-collections-navigation2 collection-gallery__navigation" data-height="83%" data-disabled="{{entity.showThumbs ? 'true' : 'false'}}" style="height:100%;">
  198.                                 <div class="splide__track">
  199.                                     <ul class="splide__list">
  200.                                         {% for image in ImageSlides %}
  201.                                             {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  202.                                             {# {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  203.                                             {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  204.                                             <li class="splide__slide">
  205.                                                 <img src="{{img}}" alt="{{image.Translation[app.request.locale].alt ? image.Translation[app.request.locale].alt}}">
  206.                                             </li>    
  207.                                         {% endfor %}                               
  208.                                     </ul>
  209.                                     <div class="splide__arrows{{ ImageSlides|length < 2 ? ' hide' }}">
  210.                                         <div class="slider-nav collection-gallery__nav">
  211.                                             <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  212.                                                 {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  213.                                             </button>
  214.                                             <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  215.                                                 {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  216.                                             </button>
  217.                                         </div>
  218.                                     </div>
  219.                                 </div>
  220.                             </div>
  221.                             </div>
  222.     </div>
  223. </div>