src/Package/Openform/Front/Templates/RelictPack/_templates/template-o8d.html.twig line 1

Open in your IDE?
  1. {% from '@openform_front_templates/_includes/_icons.html.twig' import fullscreen, zoomin, zoomout, arrowObjectPrev, arrowObjectNext, arrowright, info, copyrights, infoClose %}
  2. {% set ImageSlides = entity.ImageSlide|filterVisibles(app.request.locale) %}
  3. <div style="{% if not entity.showHeader %}height:100vh; padding-top:{{rootParent is defined and rootParent.headerHeight is defined and rootParent.headerHeight ? rootParent.headerHeight : 90}}px; {% elseif rootParent is defined and rootParent.headerHeight is defined and rootParent.headerHeight %}height: calc(100vh - {{rootParent.headerHeight}}px);{% else %} height: calc( 100vh - 90px );{% endif %}">
  4.     <div class="collections__container" style="height: {{entity.lineHeight ? 100 - entity.lineHeight : 91}}%; padding: 2% 0;">
  5.     <div class="collections__container__wrapper" style="margin:{{entity.isInvertedTemplate is defined and entity.isInvertedTemplate ? '0 1.75% 0 0' : '0 0 0 1.75%' }}; width: {{entity.imageColumnWidth ? 100 - entity.imageColumnWidth  : '51'}}%">
  6.         {% if ImageSlides|length > 0 %}
  7.          <div class="collections__wrapper" style="height: {{entity.heightTop|default('61') }}%; background: {{entity.imageBackgroundColor|default('#F8F7F0') }};r">                    
  8.                                         {% set data = ImageSlides[0] %}   
  9.                                         {% set img = openform_front_util.getImagePathByType(data.Thumb ?? '','original') %}
  10.                                         {# {% set img = openform_front_util.getImagePathByType(data.Thumb ?? '','detal') %}
  11.                                         {% set imgPagination = openform_front_util.getImagePathByType(data.Thumb ?? '','list') %} #}
  12.                                                <div class="js-zoom" data-alt="{{data.Translation[app.request.locale].alt}}" style="height: 100%; display:flex; justify-content: center; align-items: center;">
  13.                                                 <div class="collection-gallery__item" style="{{data.imageWidth ? 'width:' ~ data.imageWidth ~ '%;' : 'width: 100%;'}}
  14.                                                 {{data.imageHeight ? 'height:' ~ data.imageHeight ~ '%;' : 'height: 100%;'}}
  15.                                                 {{data.imageWidth ? 'max-width:' ~ data.imageWidth ~ '%;' : 'max-width: 100%;'}}
  16.                                                 {{data.imageHeight ? 'max-height:' ~ data.imageHeight ~ '%;' : 'max-height: 100%;'}}">
  17.                                                     <style>
  18.                                                         .my-zoomist-1 img{
  19.                                                             {% if data.imageBorderColor and data.imageBorderWidth %}border: {{data.imageBorderColor}} solid {{data.imageBorderWidth}}px;{% endif %}"
  20.                                                         }
  21.                                                         .my-zoomist-1 .zoomist-wrapper{
  22.                                                             background:{{data.imageBackgroundColor ? data.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  23.                                                         }
  24.                                                     </style>
  25.                                                     <div class="my-zoomist my-zoomist-1" data-zoomist-src="{{img}}"></div>
  26.                                                 </div>
  27.                                                 
  28.                                                 <div class="collection-gallery__wrap">
  29.                                                     <div class="collection-gallery__content block__text">
  30.                                                     </div>
  31.                                                     <style>
  32.                                                             {% if not data.Translation[app.request.locale].copyrights %}
  33.                                                                     .collection-gallery-buttons{{data.id}} .object__info--info::before {
  34.                                                                         left: 0px;
  35.                                                                     }
  36.                                                                 {% endif %}
  37.                                                             
  38.                                                     </style>
  39.                                                     <div class="collection-gallery__buttons collection-gallery-buttons{{data.id}}">
  40.                                                         {% if data.Translation[app.request.locale].text is defined and data.Translation[app.request.locale].text %}
  41.                                                                 <div class="object__info-wrap">
  42.                                                                     <button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-info-1" tabindex="0">{{info(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
  43.                                                                     <div class="object__info object__info--info js-info-1" data-lenis-prevent>
  44.                                                                         <div class="object__info__text block__text">{{data.Translation[app.request.locale].text|raw}}</div>
  45.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  46.                                                                     </div>
  47.                                                                 </div>
  48.                                                         {% endif %}
  49.                                                         {% if data.Translation[app.request.locale].copyrights %}
  50.                                                                 <div class="object__info-wrap">
  51.                                                                     <button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-copyright-1" tabindex="0">{{copyrights(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
  52.                                                                     <div class="object__info object__info--copyright js-copyright-1" data-lenis-prevent>
  53.                                                                         <div class="object__info__text block__text">{{data.Translation[app.request.locale].copyrights|raw}}</div>
  54.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  55.                                                                     </div>
  56.                                                                 </div>
  57.                                                         {% endif %}
  58.                                                         <button class="collection-gallery__buttons__btn js-fullscreen" data-alt="{{data.Translation[app.request.locale].alt}}" tabindex="0" data-color="{{data.imageBackgroundColor is defined and data.imageBackgroundColor ? data.imageBackgroundColor }}"
  59.                                                         data-image="{{img}}"
  60.                                                         data-description="{{data.Translation[app.request.locale].text}}"
  61.                                                         data-copyrights="{{data.Translation[app.request.locale].copyrights}}"
  62.                                                         data-start="0"
  63.                                                         data-imagestyle="{% if data.imageBorderColor and data.imageBorderWidth %}border: {{data.imageBorderColor}} solid {{data.imageBorderWidth}}px;{% endif %}"
  64.                                                         >
  65.                                                             {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  66.                                                         </button>
  67.                                                         <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  68.                                                         <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  69.                                                     </div>
  70.                                                 </div>
  71.                                             </div>
  72.         </div>
  73.         {% endif %}
  74.         <div class="collections__wrapper-content" style="background: {{entity.background|default('#F5DB7B') }}; width: 100%; height: {{entity.heightTop ? 100 - entity.heightTop : 39 }}%;" data-lenis-prevent>
  75.             <div class="collections__content">
  76.                 {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  77.                     <div class="collections__content__title block__h3">
  78.                         {{ entity.Translation[app.request.locale].titleHtml|raw }}
  79.                     </div>
  80.                 {% endif %}
  81.                 
  82.                 {% if entity.link is defined and entity.link %}
  83.                         <a href="{{entity.link}}" class="block-text__btns__btn button-read-more button-read-more--black">
  84.                             <span>{{('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale)}}</span>
  85.                             {{arrowright()}}
  86.                         </a>
  87.                 {% endif %}
  88.                 {% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
  89.                     <div class="collections__content__text block__text">
  90.                         {{ entity.Translation[app.request.locale].text|raw }}
  91.                     </div>
  92.                 {% endif %}
  93.                 {% if entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath) %}
  94.                     <div class="block-image__image__audio">
  95.                         <div class="block-audio__player">
  96.                             <audio controls class="js-audio-player block-audio__inner">
  97.                                 <source src="{{ entity.filePath }}">
  98.                                 Your browser does not support the audio element.
  99.                             </audio>
  100.                         </div>
  101.                     </div>
  102.                 {% endif %}
  103.                 {% if entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description %}
  104.                     <div class="collections__content__text block__text">
  105.                         {{ entity.Translation[app.request.locale].description|raw }}
  106.                     </div>
  107.                 {% endif %}
  108.                 {% if entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText %}
  109.                     <div class="collections__content__text block__text">
  110.                         {{ entity.Translation[app.request.locale].attributesText|raw }}
  111.                     </div>
  112.                 {% endif %}
  113.                 
  114.             </div>
  115.         </div> 
  116.     </div>
  117.         {% if ImageSlides|length > 1 %}
  118.         <div class="collections__wrapper" style="width: {{entity.imageColumnWidth ? 100 - entity.imageColumnWidth : '49'}}%; background: {{entity.imageBackgroundColor|default('#F8F7F0') }}; margin: 0 1.75%;">                    
  119.                                         {% set data = ImageSlides[1] %}   
  120.                                         {% set img = openform_front_util.getImagePathByType(data.Thumb ?? '','original') %}
  121.                                         {# {% set img = openform_front_util.getImagePathByType(data.Thumb ?? '','detal') %}
  122.                                         {% set imgPagination = openform_front_util.getImagePathByType(data.Thumb ?? '','list') %} #}
  123.                                                <div class="js-zoom" data-alt="{{data.Translation[app.request.locale].alt}}" style="height: 100%; display:flex; justify-content: center; align-items: center;">
  124.                                                 <div class="collection-gallery__item" style="{{data.imageWidth ? 'width:' ~ data.imageWidth ~ '%;' : 'width: 100%;'}}
  125.                                                 {{data.imageHeight ? 'height:' ~ data.imageHeight ~ '%;' : 'height: 100%;'}}
  126.                                                 {{data.imageWidth ? 'max-width:' ~ data.imageWidth ~ '%;' : 'max-width: 100%;'}}
  127.                                                 {{data.imageHeight ? 'max-height:' ~ data.imageHeight ~ '%;' : 'max-height: 100%;'}}">
  128.                                                 <style>
  129.                                                     .my-zoomist-2 img{
  130.                                                         {% if data.imageBorderColor and data.imageBorderWidth %}border: {{data.imageBorderColor}} solid {{data.imageBorderWidth}}px;{% endif %}"
  131.                                                     }
  132.                                                     .my-zoomist-2 .zoomist-wrapper{
  133.                                                         background:{{data.imageBackgroundColor ? data.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  134.                                                     }
  135.                                                  </style>
  136.                                                     <div class="my-zoomist my-zoomist-2" data-zoomist-src="{{img}}"></div>
  137.                                                 </div>
  138.                                                 
  139.                                                 <div class="collection-gallery__wrap">
  140.                                                     <div class="collection-gallery__content block__text">
  141.                                                     </div>
  142.                                                     <style>
  143.                                                             {% if not data.Translation[app.request.locale].copyrights %}
  144.                                                                     .collection-gallery-buttons{{data.id}} .object__info--info::before {
  145.                                                                         left: 0px;
  146.                                                                     }
  147.                                                                 {% endif %}
  148.                                                             
  149.                                                     </style>
  150.                                                     <div class="collection-gallery__buttons collection-gallery-buttons{{data.id}}">
  151.                                                         {% if data.Translation[app.request.locale].text is defined and data.Translation[app.request.locale].text %}
  152.                                                                 <div class="object__info-wrap">
  153.                                                                     <button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-info-2" tabindex="0">{{info(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
  154.                                                                     <div class="object__info object__info--info js-info-2" data-lenis-prevent>
  155.                                                                         <div class="object__info__text block__text">{{data.Translation[app.request.locale].text|raw}}</div>
  156.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  157.                                                                     </div>
  158.                                                                 </div>
  159.                                                         {% endif %}
  160.                                                         {% if data.Translation[app.request.locale].copyrights %}
  161.                                                                 <div class="object__info-wrap">
  162.                                                                     <button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-copyright-2" tabindex="0">{{copyrights(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
  163.                                                                     <div class="object__info object__info--copyright js-copyright-2" data-lenis-prevent>
  164.                                                                         <div class="object__info__text block__text">{{data.Translation[app.request.locale].copyrights|raw}}</div>
  165.                                                                         <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  166.                                                                     </div>
  167.                                                                 </div>
  168.                                                         {% endif %}
  169.                                                         <button class="collection-gallery__buttons__btn js-fullscreen" data-alt="{{data.Translation[app.request.locale].alt}}" tabindex="0" data-color="{{data.imageBackgroundColor is defined and data.imageBackgroundColor ? data.imageBackgroundColor }}"
  170.                                                         data-image="{{img}}"
  171.                                                         data-description="{{data.Translation[app.request.locale].text}}"
  172.                                                         data-copyrights="{{data.Translation[app.request.locale].copyrights}}"
  173.                                                         data-start="1"
  174.                                                         data-imagestyle="{% if data.imageBorderColor and data.imageBorderWidth %}border: {{data.imageBorderColor}} solid {{data.imageBorderWidth}}px;{% endif %}"
  175.                                                         >
  176.                                                             {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  177.                                                         </button>
  178.                                                         <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  179.                                                         <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  180.                                                     </div>
  181.                                                 </div>
  182.                                             </div>
  183.         </div>
  184.         {% endif %}
  185.     </div>
  186.     {% if entity.imageFooterTextColor %}
  187.         <style>
  188.             .object__nav__button{
  189.                 color: {{entity.imageFooterTextColor}};
  190.             }
  191.             .object__nav__button path{
  192.                 fill: {{entity.imageFooterTextColor}};
  193.             }
  194.         </style>
  195.     {% endif %}
  196.     
  197.     <div class="collections__arrows" style="background: {{entity.imageFooterBackgroundColor|default('#F8F4DC') }}; height: {{entity.lineHeight|default('9') }}%; color:{{entity.imageFooterTextColor|default('#231F17') }} !important;">
  198.         {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  199.                     {% if entity.id == Relict.id  %}
  200.                         {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
  201.                             {% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
  202.                             {% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  203.                             <a href="{{href}}" class="object__nav__button">{{arrowObjectPrev(('T_RELICT_PREV')|trans({}, 'openform_front', app.request.locale))}}{{ ('T_RELICT_PREV')|trans({}, 'openform_front', app.request.locale) }}</a>
  204.                         {% endif%}
  205.                         {% if entity.RelictPack.getVisibleRelicts(app.request.locale)|length > 0 %}
  206.                             <div class="collections__arrows__numbers">
  207.                                 <span>{{ key + 1 }}</span>/{{ entity.RelictPack.getVisibleRelicts(app.request.locale) is defined ? entity.RelictPack.getVisibleRelicts(app.request.locale)|length }}
  208.                             </div>
  209.                         {% endif %}
  210.                         {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  211.                             {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  212.                             {% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  213.                             <a href="{{href}}" class="object__nav__button object__nav__button--right">{{ ('T_RELICT_NEXT')|trans({}, 'openform_front', app.request.locale) }}{{arrowObjectNext(('T_RELICT_NEXT')|trans({}, 'openform_front', app.request.locale))}}</a>
  214.                         {% endif%}
  215.                     {% endif %}
  216.         {% endfor %}
  217.     </div>
  218. </div>