src/Package/Openform/Front/Templates/_includes/_header_mak.html.twig line 1

Open in your IDE?
  1. {% from '@openform_front_templates/_includes/_icons.html.twig' import logo, arrowshow, search, share, accessibility, facebooknav, instagramnav, youtubenav, magnification, contrast, reduction %}
  2. <header class="js-header" style="{{not rootParent.showHeader ? 'display:none' }}">
  3. {# {{not rootParent.showHeader ? 'display:none' }} #}
  4.     <div class="header header-mak">
  5.         <div class="header__wrapper variant js-menu" data-height="{{ rootParent.headerHeight|default(90) }}"  style="{% if background is defined and background %} background: {{background}}; {% else %} background: {{rootParent.headerBackground|default('#FFFFFF') }}; {% endif %}"> 
  6.             {% if version is defined and version == "relictPack" %}
  7.                 <div class="header-mak__head__exh">
  8.                     {% if rootParent.isExhibition is defined %}
  9.                         {% set href = toolkit_route_localizer.generate('exhibition_item', { 'slug': rootParent.Translation[app.request.locale].slug}, app.request.locale) %}    
  10.                     {% endif %}
  11.                     {% if href is defined %}
  12.                         <a href="{{href}}">{{rootParent.Translation[app.request.locale].titleHtml|raw}}</a>
  13.                     {% endif %}
  14.                 </div>
  15.             {% else %}
  16.                 
  17.             
  18.                 {% if rootParent.logoVisible is defined and rootParent.logoVisible %}
  19.                 
  20.                     <a class="header__logo-link" href="{{ toolkit_route_localizer.generate('index', {}, app.request.locale) }}">
  21.                         {% if openform_front_util.config.headerLogoPath is defined and openform_front_util.config.headerLogoPath %}
  22.                             <img src="{{openform_front_util.config.headerLogoPath}}" alt="logo" class="js-logo">
  23.                         {% endif %}
  24.                     </a>
  25.                 {% else %}
  26.                     <div></div>
  27.                 {% endif %}
  28.             {% endif %}
  29.             <div class="header-mak__head">
  30.                 {% if version is defined and version == "relictPack" %}
  31.                 <div class="header-mak__head__relict">
  32.                     {% set href = toolkit_route_localizer.generate('relict_pack_item', { 'slug': parentPage.Translation[app.request.locale].slug}, app.request.locale) %} 
  33.                     
  34.                     <a href="{{href}}">{{parentPage.Translation[app.request.locale].titleHtml|raw}}</a>
  35.                 </div>
  36.                 
  37.                 {% else %}
  38.                     
  39.                 {% if  rootParent.logo[0] is defined and rootParent.logo[0] %}
  40.                     {% set imgLogo = openform_front_util.getImagePathByType(rootParent.logo[0].Thumb ?? '','logo') %}
  41.                     <div class="header-mak__head__logotype">
  42.                         <img src="{{imgLogo}}" alt="{{rootParent.logo[0].Translation[app.request.locale].alt}}" title="{{rootParent.logo[0].Translation[app.request.locale].title}}" class="js-logo">
  43.                     </div>
  44.                 {% endif %}
  45.                 <div class="header-mak__head__title">
  46.                     {% if rootParent.isExhibition is defined %}
  47.                         {% set href = toolkit_route_localizer.generate('exhibition_item', { 'slug': rootParent.Translation[app.request.locale].slug}, app.request.locale) %}    
  48.                     {% elseif rootParent.isMak is defined %}
  49.                         {% set href = toolkit_route_localizer.generate('mak_item', {'makSlug': rootParent.getMakSlug(app.request.locale), 'slug': rootParent.Translation[app.request.locale].slug}, app.request.locale)  %}    
  50.                     {% endif %}
  51.                     {% if href is defined %}
  52.                         <a href="{{href}}">{{rootParent.Translation[app.request.locale].titleHtml|raw}}</a>
  53.                     {% endif %}
  54.                 </div>
  55.                 {% endif %}
  56.             </div>
  57.                 
  58.                 
  59.             
  60.             <div class="header__container">
  61.             {# klasa: variant #}
  62.                 {% include '@openform_front_templates/_includes/_main-menu.html.twig' with {class:'variant'}  %}
  63.                         
  64.                 <div class="header__buttons">
  65.                     <button class="header__buttons__button header__buttons__menu" type="button" data-expanded="js-links" aria-expanded="false">
  66.                         <div class="header__buttons__burger"></div>
  67.                     </button>
  68.                     <button 
  69.                             class="header__buttons__button header__buttons__search" 
  70.                             type="button" 
  71.                             aria-expanded="false" 
  72.                             data-dialog="js-header-search" 
  73.                             data-dialogtimeout="1500" 
  74.                         >
  75.                             {{ search('T_SEARCH_ON_THE_SITE'|trans({}, 'openform_front', app.request.locale)) }}
  76.                     </button>
  77.                     <div class="header__expandable">
  78.                         <button class="header__buttons__button header__buttons__share" type="button" data-expanded="js-share-switcher" aria-expanded="false">
  79.                             {{share()}}
  80.                             {{arrowshow()}}
  81.                         </button>
  82.                         {% set config = openform_front_util.getConfig() %}
  83.                         <div class="header__expandable__list header__expandable--share js-share-switcher">
  84.                             {% if config.linkFacebook %}
  85.                                 <a href="{{ config.linkFacebook }}" class="header__buttons__button header__buttons__share header__expandable__btn">
  86.                                     {{facebooknav()}}
  87.                                 </a>
  88.                             {% endif %}
  89.                             {% if config.linkInstagram %}
  90.                                 <a href="{{ config.linkInstagram }}" class="header__buttons__button header__buttons__share header__expandable__btn">
  91.                                     {{instagramnav()}}
  92.                                 </a>
  93.                             {% endif %}
  94.                             {% if config.linkYoutube %}
  95.                                 <a href="{{ config.linkYoutube }}" class="header__buttons__button header__buttons__share header__expandable__btn">
  96.                                     {{youtubenav()}}
  97.                                 </a>
  98.                             {% endif %}
  99.                         </div>
  100.                     </div>
  101.                     <div class="header__expandable">
  102.                         <button class="header__buttons__button header__buttons__accessibility" type="button" data-expanded="js-accessibility-switcher" aria-expanded="false">
  103.                             {{accessibility()}}
  104.                             {{arrowshow()}}
  105.                         </button>
  106.                         <div class="header__expandable__list header__expandable--accessibility js-accessibility-switcher">
  107.                             <button class="header__buttons__button header__buttons__accessibility header__expandable__btn js-contrast-change" type="button">
  108.                                 {{contrast()}}
  109.                             </button>
  110.                             <button class="header__buttons__button header__buttons__accessibility header__expandable__btn js-font-resize-plus" type="button">
  111.                                 {{magnification()}}
  112.                             </button>
  113.                             <button class="header__buttons__button header__buttons__accessibility header__expandable__btn js-font-resize-minus" type="button">
  114.                                 {{reduction()}}
  115.                             </button>
  116.                         </div>
  117.                     </div>
  118.                 </div>
  119.             </div>
  120.         </div>
  121.     </div>
  122. {% include '@openform_front_templates/_includes/_search.html.twig' %}
  123. </header>