src/Package/Openform/Front/Templates/RelictPack/_templates/template-o2b.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" style="{% if entity.imageBorderColor and entity.imageBorderWidth %}outline: {{entity.imageBorderColor}} solid {{entity.imageBorderWidth}}px;{% endif %}" src="{{img}}" alt="{{ entity.Translation[app.request.locale].alt ? entity.Translation[app.request.locale].alt }}">
  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 %}" data-lenis-prevent>
  30.     <div class="collections__content">
  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.         <div class="collections__line-2" style="background: {{entity.lineColor2|default('#9B9791') }}; height:{{entity.lineHeight2|default('10') }}px;"></div>
  71.         <div class="collections__arrows">
  72.             {% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
  73.                 {% if entity.id == Relict.id  %}
  74.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
  75.                         {% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
  76.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  77.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--prev">
  78.                             {{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  79.                         </a>
  80.                     {% endif%}
  81.                     {% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
  82.                         {% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
  83.                         {% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  84.                         <a href="{{href}}" class="slider-nav__btn slider-nav__btn--next">
  85.                             {{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  86.                         </a>
  87.                     {% endif%}
  88.                 {% endif %}
  89.             {% endfor %}
  90.         </div>
  91.         
  92.     </div>
  93. </div>
  94. <div class="collections__wrapper {% if ImageSlides|length > 1 %}collections__wrapper--double{% endif %}" style="background: {{entity.imageBackgroundColor|default('#F8F7F0') }}; width: 
  95.     {% if entity.textAreaWidth and entity.imageColumnWidth and (entity.textAreaWidth + entity.imageColumnWidth < 80) %}
  96.         {{ entity.imageColumnWidth}}%;
  97.     {% elseif entity.textAreaWidth and entity.imageColumnWidth == null %}
  98.         {{100 - entity.textAreaWidth - 20}}%;
  99.     {% elseif entity.textAreaWidth == null and entity.imageColumnWidth %}
  100.         {{ entity.imageColumnWidth}}%;
  101.     {% else %}
  102.         55%;
  103.     {% endif %}
  104.     {% if not entity.showHeader %}padding-top:{{rootParent is defined and rootParent.headerHeight is defined and rootParent.headerHeight ? rootParent.headerHeight : 90}}px;{% endif %}">
  105.     {% if ImageSlides|length == 1 %}
  106.     
  107.     {% set image = ImageSlides|length == 1 and ImageSlides is defined and ImageSlides[0] ? ImageSlides[0] %}
  108.     {% if image is defined and image %}
  109.         {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  110.         {# {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','imageA') %}
  111.         {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  112.         <div class="collections__wrapper__zoom js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="{{image.imageWidth ? 'width:'~ image.imageWidth ~ '%;': 'width: 56%;'}} {{image.imageHeight ? 'height:'~ image.imageHeight + 6 ~ '%;': 'height: 60%;'}}">
  113.             <div class="collection-gallery__item collection-gallery__item--o3 " style="{{image.imageBorderWidth ? 'width: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'width: 100%;'}}
  114.                     {{image.imageBorderWidth ? 'max-width: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'max-width: 100%;'}}
  115.                     {{image.imageBorderWidth ? 'height: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'height: 100%;'}}
  116.                     {{image.imageBorderWidth ? 'max-height: calc(100% - ' ~ 2 * image.imageBorderWidth ~ 'px);' : 'max-height: 100%;'}}
  117.                     ">
  118.                 <div class="my-zoomist" data-zoomist-src="{{img}}" data-alt="{{image.Translation[app.request.locale].alt}}" tabindex="0"></div>
  119.             </div>
  120.                                     
  121.             <div class="collection-gallery__wrap">
  122.                 <div>
  123.                     
  124.                 </div>
  125.                 <div class="collection-gallery__buttons">
  126.                     {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  127.                                                             <div class="object__info-wrap">
  128.                                                                 <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>
  129.                                                                 <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  130.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  131.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  132.                                                                 </div>
  133.                                                             </div>
  134.                                                         {% endif %}
  135.                                                         {% if image.Translation[app.request.locale].copyrights %}
  136.                                                             <div class="object__info-wrap">
  137.                                                                 <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>
  138.                                                                 <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  139.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  140.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  141.                                                                 </div>
  142.                                                             </div>
  143.                                                         {% endif %}
  144.                                             <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 }}"
  145.                                                 data-image="{{img}}"
  146.                                                 data-description="{{image.Translation[app.request.locale].text}}"
  147.                                                 data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  148.                                                 data-start="0"
  149.                                                 data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  150.                                             >
  151.                                                 {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  152.                                             </button>
  153.                     <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  154.                     <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  155.                 </div>
  156.             </div>
  157.         </div>
  158.     {% endif %}
  159.     {% elseif ImageSlides|length > 1 %}
  160.         {% for key, image in ImageSlides|slice(0, 2) %}
  161.             {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  162.             {# {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','imageA') %}
  163.             {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %} #}
  164.             <div class="collections__wrapper__zoom js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}" style="{{image.imageWidth ? 'width:'~ image.imageWidth ~ '%;': 'width: 32%;'}} {{image.imageHeight ? 'height:'~ image.imageHeight + 6 ~ '%;': 'height: 38%;'}}">
  165.                 <div class="collection-gallery__item collection-gallery__item--o3 " style="width: 100%; max-width: 100%; height: 100%; max-height: 100%;">
  166.                     <style>
  167.                         .my-zoomist-{{key}} img{
  168.                             {% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  169.                         }
  170.                         .my-zoomist-{{key}} .zoomist-wrapper{
  171.                             background:{{image.imageBackgroundColor ? image.imageBackgroundColor : entity.imageBackgroundColor ? entity.imageBackgroundColor : '#F8F7F0' }};
  172.                         }
  173.                     </style>
  174.                     <div class="my-zoomist my-zoomist-{{key}}" data-zoomist-src="{{img}}" tabindex="0"></div>
  175.                 </div>
  176.                                         
  177.                 <div class="collection-gallery__wrap">
  178.                     <div>
  179.                         
  180.                     </div>
  181.                     <div class="collection-gallery__buttons">
  182.                         {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  183.                                                             <div class="object__info-wrap">
  184.                                                                 <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>
  185.                                                                 <div class="object__info object__info--info js-info-{{key}}" data-lenis-prevent>
  186.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  187.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  188.                                                                 </div>
  189.                                                             </div>
  190.                                                         {% endif %}
  191.                                                         {% if image.Translation[app.request.locale].copyrights %}
  192.                                                             <div class="object__info-wrap">
  193.                                                                 <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>
  194.                                                                 <div class="object__info object__info--copyright js-copyright-{{key}}" data-lenis-prevent>
  195.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  196.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  197.                                                                 </div>
  198.                                                             </div>
  199.                                                         {% endif %}
  200.                                                 <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 }}"
  201.                                                     data-image="{{img}}"
  202.                                                     data-description="{{image.Translation[app.request.locale].text}}"
  203.                                                     data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  204.                                                     data-start="{{key}}"
  205.                                                                         data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  206.                                                 >
  207.                                                     {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  208.                                                 </button>
  209.                         <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  210.                         <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  211.                     </div>
  212.                 </div>
  213.             </div>
  214.         {% endfor %}
  215.    {% endif %}
  216.    
  217. </div> 
  218. <div class="collections__line  {% if not entity.showHeader %}collections__line--padding{% endif %}" style="background: {{entity.imageBackgroundColor|default('#F8F7F0') }};
  219. width:
  220.    {% if entity.textAreaWidth and entity.imageColumnWidth and (entity.textAreaWidth + entity.imageColumnWidth < 100) %}
  221.         {{entity.textAreaWidth + entity.imageColumnWidth}}%
  222.     {% elseif entity.textAreaWidth and entity.imageColumnWidth == null %}
  223.         {{entity.textAreaWidth + (100 - entity.textAreaWidth - 20)}}%
  224.     {% elseif entity.textAreaWidth == null and entity.imageColumnWidth %}
  225.         {{entity.imageColumnWidth + (100 - entity.imageColumnWidth - 20)}}%
  226.     {% else %}
  227.         80%
  228.     {% endif %}
  229. ;">
  230.     <div class="collections__line__inner" style="width: 97%; background: {{entity.lineColor|default('#F5DB7B') }}; height:{{entity.lineHeight|default('10') }}px;"></div>
  231. </div>