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