src/Package/Openform/Front/Templates/RelictPack/_templates/template-o11.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="height: 100%; {% if not entity.showHeader %}height:100vh; {% elseif rootParent is defined and rootParent.headerHeight is defined and rootParent.headerHeight %}height: calc(100vh - {{rootParent.headerHeight}}px);{% else %} height: calc( 100vh - 90px );{% endif %} background:{{entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};">
  4.     {% set href = toolkit_route_localizer.generate('relict_pack_item', { 'slug': parentPage.Translation[app.request.locale].slug}, app.request.locale) %} 
  5.     {% if entity.heightTop is same as(0) %}
  6.     {% elseif (entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (parentPage.Translation[app.request.locale].titleHtml is defined and parentPage.Translation[app.request.locale].titleHtml) or (href) %} 
  7.         <div class="collections__top" style="background-color: {{entity.lineColor|default('#F8F7F0')}}; {% if not entity.showHeader %}padding-top: 111px; height: calc({{entity.heightTop|default('16') }}% + 90px); {% else %} height: {{entity.heightTop|default('16') }}%; {% endif %}">
  8.             {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  9.                 <div class="collections__top__title block__h3">
  10.                     {{ entity.Translation[app.request.locale].titleHtml|raw }}
  11.                 </div>
  12.             {% endif %}
  13.             
  14.             <a class="collections__top__subtitle" href="{{href}}">{{parentPage.Translation[app.request.locale].titleHtml|raw}}</a>
  15.         </div>
  16.    {% endif %}
  17.     {% if ImageSlides|length > 0 %}
  18.         <div class="js-collection-gallery-standard" style="height: {% if not entity.showHeader %}calc({% endif %}{{ 
  19.     not((entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (parentPage.Translation[app.request.locale].titleHtml is defined and parentPage.Translation[app.request.locale].titleHtml) or (href) or (entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) or (entity.heightTop is same as(0)  and entity.heightBottom is same as(0)) ? 100 :
  20.     not((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) or (not entity.heightTop is same as(0)  and entity.heightBottom is same as(0) and entity.heightTop == null) ? 100 - 16 :
  21.     not((entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (parentPage.Translation[app.request.locale].titleHtml is defined and parentPage.Translation[app.request.locale].titleHtml) or (href)) or (entity.heightTop is same as(0)  and not entity.heightBottom is same as(0) and entity.heightBottom == null) ? 100 - 19 :
  22.     not ((entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml) or (entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text) or (entity.link is defined and entity.link)) or (entity.heightTop is same as(0)  and not entity.heightBottom is same as(0) and entity.heightBottom) ? 100 - entity.heightBottom : not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or entity.Translation[app.request.locale].text or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText) or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) or
  23.     (not entity.heightTop is same as(0)  and entity.heightBottom is same as(0) and entity.heightTop) ? 100 - entity.heightTop :
  24.     entity.heightTop  and entity.heightBottom  ? 100 - entity.heightTop - entity.heightBottom : 
  25.     entity.heightTop and entity.heightBottom == null  ? 100 - 19 - entity.heightTop : 
  26.     entity.heightTop == null and entity.heightBottom  ? 100 - 16 - entity.heightBottom : 
  27.     65 }}% {% if not entity.showHeader %}- 90px);{% endif %}">
  28.              <div class="collections__arrows">
  29.                 {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  30.                 {% if entity.id == Relict.id  %}
  31.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
  32.                         {% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
  33.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  34.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--prev">
  35.                             {{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  36.                         </a>
  37.                     {% endif%}
  38.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  39.                         {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  40.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  41.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--next">
  42.                             {{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  43.                         </a>
  44.                     {% endif%}
  45.                 {% endif %}
  46.                 {% endfor %}
  47.             </div>
  48.             <div class="splide js-collections-gallery-o8 collection-gallery" style="height: 100%;">
  49.                 <div class="splide__track" style="height: 100%;">
  50.                     <ul class="splide__list" style="height: 100%;">
  51.                         {% for key, image in ImageSlides %}
  52.                             {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  53.                             
  54.                             {# {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '', 'temp12') %}
  55.                             {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '', 'temp12small') %} #}
  56.                             <li class="splide__slide" style="height: 100%;">
  57.                                 <div class="collection-gallery__item js-openseadragon" style="height: 100%;" data-id="main{{image.id}}viewer" data-navid="nav{{image.id}}viewerv" data-img="{{ img }}" data-toolbarid="tool{{image.id}}bar" data-zoomoutid="zoom{{image.id}}out" data-zoominid="zoom{{image.id}}in">
  58.                                 <style>
  59.                                     #main{{image.id}}viewer{
  60.                                         {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderWidth}}px solid {{image.imageBorderColor}}; {% endif %}
  61.                                         {{image.imageWidth ? 'width:' ~ image.imageWidth ~ '% !important;' : 'width: 100% !important;'}}
  62.                                         {{image.imageHeight ? 'height:' ~ image.imageHeight ~ '% !important;' : 'height: 100% !important;'}}
  63.                                     }
  64.                                 </style>
  65.                                     <div class="main-viewer" id="main{{image.id}}viewer">
  66.                                         
  67.                                     </div>
  68.                                 </div>
  69.                                 {% if entity.heightBottom is same as(0) %}
  70.                                     
  71.                                 {% endif %}
  72.                                 
  73.                                 <div class="navigation-container" {% if entity.heightBottom is same as(0) or not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) %}style="bottom: 16%;"{% endif %}>
  74.                                 
  75.                                 <div id="nav{{image.id}}viewerv" class="nav-viewer"></div>
  76.                                 <div id="tool{{image.id}}bar" class="toolbar"></div>
  77.                                 </div>
  78.                                 <style>
  79.                                     .collection-gallery-buttons{{image.id}}{
  80.                                         {% if not image.Translation[app.request.locale].copyrights %}
  81.                                             .object__info--info::before {
  82.                                                 right: 166px;
  83.                                             }
  84.                                         {% endif %}
  85.                                     }
  86.                                 </style>
  87.                                 <div class="collection-gallery__buttons collection-gallery-buttons{{image.id}}" {% if entity.heightBottom is same as(0) or not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) %}style="bottom: 9%;"{% endif %}>
  88.                                     {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  89.                                         <div class="object__info-wrap">
  90.                                             <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>
  91.                                             <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  92.                                                 <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  93.                                                 <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  94.                                             </div>
  95.                                         </div>
  96.                                     {% endif %}
  97.                                     {% if image.Translation[app.request.locale].copyrights %}
  98.                                         <div class="object__info-wrap">
  99.                                             <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>
  100.                                             <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  101.                                                 <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  102.                                                 <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  103.                                             </div>
  104.                                         </div>
  105.                                     {% endif %}
  106.                                     <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 }}"
  107.                                         data-image="{{img}}"
  108.                                         data-description="{{image.Translation[app.request.locale].text}}"
  109.                                         data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  110.                                         data-start="{{key}}"
  111.                                         data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  112.                                     >
  113.                                         {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  114.                                     </button>
  115.                                     <button class="collection-gallery__buttons__btn" id="zoom{{image.id}}out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  116.                                     <button class="collection-gallery__buttons__btn" id="zoom{{image.id}}in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  117.                                 </div>
  118.                                
  119.                             </li>
  120.                         {% endfor %}
  121.                     </ul>
  122.                     <div class="splide__arrows{{ ImageSlides|length < 2 ? ' hide' }}" >
  123.                         <div class="slider-nav collection-gallery__nav" {% if entity.heightBottom is same as(0) or not ((entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath))) %}style="bottom: 1%;"{% endif %}>
  124.                             <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  125.                                 {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  126.                             </button>
  127.                             
  128.                             <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  129.                                 {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  130.                             </button>
  131.                         </div>
  132.                     </div>
  133.                 </div>
  134.             </div>
  135.         </div>
  136.     {% endif %}
  137.     {% if entity.heightBottom is same as(0) %}
  138.     {% elseif (entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description) or (entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText)or entity.Translation[app.request.locale].text or (entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath)) %}
  139.     <div class="collections__bottom" style="background: {{entity.lineColor2|default('#F5DB7B') }}; height: {{entity.heightBottom|default('19') }}%;" data-lenis-prevent>
  140.             {% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
  141.                 <div class="collections__content__text block__text">
  142.                     {{ entity.Translation[app.request.locale].text|raw }}
  143.                 </div>
  144.             {% endif %}
  145.             {% if entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description %}
  146.                 <div class="collections__content__text block__text">
  147.                     {{ entity.Translation[app.request.locale].description|raw }}
  148.                 </div>
  149.             {% endif %}
  150.             {% if entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText %}
  151.                 <div class="collections__content__text block__text">
  152.                     {{ entity.Translation[app.request.locale].attributesText|raw }}
  153.                 </div>
  154.             {% endif %}
  155.             {% if entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath) %}
  156.                 <div class="block-image__image__audio">
  157.                     <div class="block-audio__player">
  158.                         <audio controls class="js-audio-player block-audio__inner">
  159.                             <source src="{{ entity.filePath }}">
  160.                             Your browser does not support the audio element.
  161.                         </audio>
  162.                     </div>
  163.                 </div>
  164.             {% endif %}
  165.     </div>
  166.     {% endif %}
  167.     </div> 
  168.     
  169. </div>