src/Package/Openform/Front/Templates/RelictPack/_templates/template-o4a.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="width: {{entity.lineHeightLeft|default('9') }}%; background: {{entity.imageBackgroundColor|default('#F8F7F0') }}; {% if not entity.showHeader %}padding-top:{{rootParent is defined and rootParent.headerHeight is defined and rootParent.headerHeight ? rootParent.headerHeight : 90}}px; {% else %} padding-top: 0.8%;{% endif %} height:100%; ">
  4.     {% set img = openform_front_util.getImagePathByType(entity.Thumb ?? '','column') %}
  5.     {% if img is defined and img %}
  6.         <div class="collections__wrapper__fullsize" style="background:{{entity.lineColorLeft|default('#231F17')}}; height: calc(100% - {{entity.lineHeightBottom2|default('3.3') }}% - 36px);">
  7.         </div>
  8.     {% endif %}
  9. </div>
  10. <div class="collections__container" style="width:  {{ entity.lineHeightLeft is same as(0) ? 100 : entity.lineHeightLeft ? 100 - entity.lineHeightLeft : 91 }}%; height: 100%; max-height:100%; background: {{entity.imageBackgroundColor|default('#F8F7F0') }}; {% if not entity.showHeader %}padding-top:{{rootParent is defined and rootParent.headerHeight is defined and rootParent.headerHeight ? rootParent.headerHeight : 90}}px; {% else %} padding-top: 0.8%;{% endif %}">
  11.     <div class="collections__line {% if not entity.showHeader %}collections__line--padding{% endif %}" style="background: {{entity.imageBackgroundColor|default('#F8F7F0') }}; max-height:{{entity.lineHeightTop1|default('1') }}%;  min-height:{{entity.lineHeightTop1|default('1') }}%;">
  12.         <div class="collections__line__inner" style="width: 100%; background: {{entity.lineColorTop1|default('#F5DB7B') }}; height:100%;"></div>
  13.     </div>
  14.     <div class="collections__container__wrapper" style="height: calc(100% - {{entity.lineHeightTop1|default('1') }}% - 23px - {{entity.lineHeightBottom2|default('3.3') }}% - 36px">
  15.         <div class="collections__wrapper__content" style=" 
  16.         position: relative;
  17.         width: 
  18.             {% if entity.textAreaWidth %}
  19.                 {{ entity.textAreaWidth}}%;
  20.             {% else %}
  21.                 28%;
  22.             {% endif %}
  23.             
  24.         " data-lenis-prevent>  
  25.             <div class="collections__line-2" style="background: {{entity.lineColorTop2|default('#231F17')}}; height: {{entity.lineHeightTop2|default('4')}}%">
  26.                 
  27.             </div>
  28.             
  29.             
  30.             <div class="collections__content" style="background: {{entity.background|default('#F5DB7B') }}; height: {{ entity.lineHeightTop2 and entity.lineHeightBottom1 ? 83.1 - entity.lineHeightTop2 - entity.lineHeightBottom1 : entity.lineHeightTop2 and entity.lineHeightBottom1 == null ? 83.1 - entity.lineHeightTop2 : entity.lineHeightTop2 == null and entity.lineHeightBottom1 ? 83.1 - entity.lineHeightBottom1 : 78 }}%;">
  31.                 <div class="collections__content__scroll">
  32.                     {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  33.                         <div class="collections__content__title block__h3">
  34.                             {{ entity.Translation[app.request.locale].titleHtml|raw }}
  35.                         </div>
  36.                     {% endif %}
  37.                     
  38.                     {% if entity.link is defined and entity.link %}
  39.                             <a href="{{entity.link}}" class="block-text__btns__btn button-read-more button-read-more--black">
  40.                                 <span>{{('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale)}}</span>
  41.                                 {{arrowright()}}
  42.                             </a>
  43.                     {% endif %}
  44.                     {% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
  45.                         <div class="collections__content__text block__text">
  46.                             {{ entity.Translation[app.request.locale].text|raw }}
  47.                         </div>
  48.                     {% endif %}
  49.                     {% if entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath) %}
  50.                         <div class="block-image__image__audio">
  51.                             <div class="block-audio__player">
  52.                                 <audio controls class="js-audio-player block-audio__inner">
  53.                                     <source src="{{ entity.filePath }}">
  54.                                     Your browser does not support the audio element.
  55.                                 </audio>
  56.                             </div>
  57.                         </div>
  58.                     {% endif %}
  59.                     {% if entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description %}
  60.                         <div class="collections__content__text block__text">
  61.                             {{ entity.Translation[app.request.locale].description|raw }}
  62.                         </div>
  63.                     {% endif %}
  64.                     {% if entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText %}
  65.                         <div class="collections__content__text block__text">
  66.                             {{ entity.Translation[app.request.locale].attributesText|raw }}
  67.                         </div>
  68.                     {% endif %}
  69.                 </div>
  70.                 
  71.                 
  72.                 
  73.             </div>
  74.             <div class="collections__arrows">
  75.                     {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  76.                 {% if entity.id == Relict.id  %}
  77.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
  78.                         {% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
  79.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  80.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--prev">
  81.                             {{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  82.                         </a>
  83.                     {% endif%}
  84.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  85.                         {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  86.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  87.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--next">
  88.                             {{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  89.                         </a>
  90.                     {% endif%}
  91.                 {% endif %}
  92.     {% endfor %}
  93.                 </div>
  94.                 <div class="collections__line-3" style="position:absolute; bottom: 0; background: {{entity.lineColorBottom1|default('#231F17')}}; height: {{entity.lineHeightBottom1|default('1.1')}}%"></div>
  95.         </div>
  96.         <div class="collections__wrapper" style="background: {{entity.imageBackgroundColor|default('#F8F7F0') }}; width: 
  97.             {% if entity.textAreaWidth %}
  98.                 {{ 100 - entity.textAreaWidth }}%;
  99.             {% else %}
  100.                 72%;
  101.             {% endif %}">
  102.         {% if ImageSlides|length > 0 %}
  103.             <div class="js-collection-gallery-standard" style="height: 84%;">
  104.                 <div class="splide js-collections-gallery-o5 collection-gallery" style="height: 100%;">
  105.                     <div class="splide__track" style="height: 100%;">
  106.                         <ul class="splide__list" style="height: 100%;">
  107.                             {% for key, image in ImageSlides %}
  108.                                 {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  109.                                 {# {% set imgSmall = openform_front_util.getImagePathByType(image.Thumb ?? '','detal') %}
  110.                                 {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  111.                                 <li class="splide__slide" style="display:flex; align-items: center; justify-content:center;" style="height: 100%;">
  112.                                     <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="{{image.imageWidth ? 'width:' ~ image.imageWidth ~ '%;' : 'width: 100%;'}} height: 100%; display:flex; align-items: center; justify-content:center;">
  113.                                         <div class="collection-gallery__item" style="{{image.imageHeight ? 'height:' ~ image.imageHeight ~ '%;' : 'height: 100%;'}} {{image.imageHeight ? 'max-height:' ~ image.imageHeight ~ '%;' : 'max-height: 100%;'}}">
  114.                                                 <style>
  115.                                                     .my-zoomist-{{key}} img{
  116.                                                         {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  117.                                                     }
  118.                                                     .my-zoomist-{{key}} .zoomist-wrapper{
  119.                                                         background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  120.                                                     }
  121.                                                 </style>
  122.                                             <div class="my-zoomist my-zoomist-{{key}}" data-zoomist-src="{{img}}" data-alt="{{image.Translation[app.request.locale].alt}}" tabindex="0"></div>
  123.                                         </div>
  124.                                         
  125.                                         <div class="collection-gallery__wrap">
  126.                                             <div class="collection-gallery__content block__text">
  127.                                                 {# {{image.Translation[app.request.locale].text ? image.Translation[app.request.locale].text}} #}
  128.                                             </div>
  129.                                             <div class="collection-gallery__buttons">
  130.                                                 {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  131.                                                             <div class="object__info-wrap">
  132.                                                                 <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>
  133.                                                                 <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  134.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  135.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  136.                                                                 </div>
  137.                                                             </div>
  138.                                                         {% endif %}
  139.                                                         {% if image.Translation[app.request.locale].copyrights %}
  140.                                                             <div class="object__info-wrap">
  141.                                                                 <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>
  142.                                                                 <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  143.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  144.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  145.                                                                 </div>
  146.                                                             </div>
  147.                                                         {% endif %}
  148.                                                 <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 }}"
  149.                                                     data-image="{{img}}"
  150.                                                     data-description="{{image.Translation[app.request.locale].text}}"
  151.                                                     data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  152.                                                     data-start="{{key}}"
  153.                                                     data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  154.                                                 >
  155.                                                     {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  156.                                                 </button>
  157.                                                 <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  158.                                                 <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  159.                                             </div>
  160.                                         </div>
  161.                                     </div>
  162.                                 </li>    
  163.                             {% endfor %}                               
  164.                         </ul>
  165.                         <div class="splide__arrows{{ ImageSlides|length < 2 ? ' hide' }}">
  166.                             <div class="slider-nav collection-gallery__nav collection-gallery__nav--white">
  167.                                 <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  168.                                     {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  169.                                 </button>
  170.                                 
  171.                                 <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  172.                                     {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  173.                                 </button>
  174.                             </div>
  175.                         </div>
  176.                         <ul class="splide__pagination collection-gallery__pagination"></ul>
  177.                     </div>
  178.                 </div>
  179.             </div>
  180.             {% endif %}
  181.         </div> 
  182.     </div>
  183.     <div class="collections__line-4" style="height: {{entity.lineHeightBottom2|default('3.3') }}%; background: {{entity.lineColorBottom2|default('#231F17') }};"></div>
  184. </div>