custom/plugins/zenitPlatformHorizon/src/Resources/views/storefront/layout/header/header.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %}
  2. {% block layout_header %}
  3.     {% set topBarStyle = theme_config('zen-top-bar-style') %}
  4.     {% if theme_config('zen-top-bar-style') is same as ('hidden') and (page.header.languages.count > 1 or page.header.currencies.count > 1 or config('zenitPlatformHorizon.config.marketingActive')) %}
  5.         {% set topBarStyle = 'offcanvas' %}
  6.     {% else %}
  7.         {% set topBarStyle = theme_config('zen-top-bar-style') %}
  8.     {% endif %}
  9.     {% block layout_top_bar %}
  10.         {% if topBarStyle is same as('offcanvas') %}
  11.             {% if theme_config('zen-header-style') is not same as ('two-line') or (theme_config('zen-header-style') is same as ('two-line') and config('zenitPlatformHorizon.config.marketingActive')) %}
  12.                 <div class="d-none js-top-bar-offcanvas-initial-content">
  13.                     {% sw_include '@zenitPlatformHorizon/storefront/layout/header/zen-top-bar-offcanvas.html.twig' with {topBarStyle: topBarStyle} %}
  14.                 </div>
  15.             {% endif %}
  16.         {% else %}
  17.             {% if theme_config('zen-header-style') is not same as ('two-line') or (theme_config('zen-header-style') is same as ('two-line') and config('zenitPlatformHorizon.config.marketingActive')) %}
  18.                 <div class="collapse{% if topBarStyle is same as ('collapsible') or topBarStyle is same as ('default') %} show{% endif %}"
  19.                      id="topBarCollapse">
  20.                     {% sw_include '@Storefront/storefront/layout/header/top-bar.html.twig' with {topBarStyle: topBarStyle} %}
  21.                 </div>
  22.             {% endif %}
  23.         {% endif %}
  24.     {% endblock %}
  25.     {% block layout_header_navigation %}
  26.         <div class="nav-header {{ navHeaderClasses|join(' ') }}">
  27.             <div class="container">
  28.                 <div class="header-row row header-gutters align-items-center {{ headerRowClasses }}">
  29.                     {% block layout_header_logo %}
  30.                         <div class="header-logo-col {{ logoClasses }}">
  31.                             {% sw_include '@Storefront/storefront/layout/header/logo.html.twig' %}
  32.                         </div>
  33.                     {% endblock %}
  34.                     {% if theme_config('zen-header-style') is same as ('single-line') %}
  35.                         {% block layout_header_main_navigation %}
  36.                             <div class="header-nav-col nav-main {{ mainNavigationClasses }} {{ navMainClasses|join(' ') }}">
  37.                                 {% block layout_header_main_navigation_inner %}
  38.                                     {% sw_include '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  39.                                 {% endblock %}
  40.                             </div>
  41.                         {% endblock %}
  42.                     {% endif %}
  43.                     {% if theme_config('zen-header-style') is same as ('two-line') %}
  44.                         {% block zen_layout_header_top_bar %}
  45.                             <div class="header-top-bar-col {{ topBarClasses }}">
  46.                                 <div class="row no-gutters">
  47.                                     {% block zen_layout_navigation_offcanvas_navigation_action_language %}
  48.                                         {% sw_include '@Storefront/storefront/layout/header/actions/language-widget.html.twig' %}
  49.                                     {% endblock %}
  50.                                     {% block zen_layout_navigation_offcanvas_navigation_action_currency %}
  51.                                         {% sw_include '@Storefront/storefront/layout/header/actions/currency-widget.html.twig' %}
  52.                                     {% endblock %}
  53.                                     {% block zen_layout_navigation_offcanvas_navigation_action_service %}
  54.                                         {% sw_include '@Storefront/storefront/layout/header/actions/service-menu-widget.html.twig' %}
  55.                                     {% endblock %}
  56.                                 </div>
  57.                             </div>
  58.                         {% endblock %}
  59.                     {% endif %}
  60.                     {% block layout_header_navigation_toggle %}
  61.                         <div class="header-menu-button {{ mainNavigationToggleClasses }}">
  62.                             {% block layout_header_navigation_toggle_button %}
  63.                                 <button class="btn nav-main-toggle-btn header-actions-btn"
  64.                                         type="button"
  65.                                         data-offcanvas-menu="true"
  66.                                         aria-label="{{ "general.menuLink"|trans|striptags }}">
  67.                                     {% block layout_header_navigation_toggle_button_icon %}
  68.                                         {% sw_icon 'stack' %}
  69.                                     {% endblock %}
  70.                                 </button>
  71.                             {% endblock %}
  72.                         </div>
  73.                     {% endblock %}
  74.                     {% block layout_header_search %}
  75.                         {% if theme_config('zen-search-style') is not same as('expandable') %}
  76.                             <div class="header-search-col {{ searchClasses }}">
  77.                                 {% if theme_config('zen-search-style') is same as('overlay') %}
  78.                                     {% block zen_layout_header_search_overlay_close %}
  79.                                         <button class="d-none js-overlay-close"
  80.                                                 type="button"
  81.                                                 aria-label="Close">
  82.                                             {% block zen_layout_header_search_overlay_close_icon %}
  83.                                                 {% sw_icon 'x' style { 'size': 'lg' } %}
  84.                                             {% endblock %}
  85.                                         </button>
  86.                                     {% endblock %}
  87.                                 {% endif %}
  88.                                 {% sw_include '@Storefront/storefront/layout/header/search.html.twig' %}
  89.                             </div>
  90.                         {% endif %}
  91.                     {% endblock %}
  92.                     {% block layout_header_actions %}
  93.                         <div class="header-actions-col {{ actionClasses }}">
  94.                             <div class="row no-gutters{% if theme_config('zen-logo-position') is not same as ('right') %} justify-content-end{% endif %}">
  95.                                 {% block layout_header_search_toggle %}
  96.                                     <div class="col-auto{% if theme_config('zen-search-style') is same as('default') %} d-sm-none{% endif %}{% if theme_config('zen-header-style-mobile') is same as ('single-line') and theme_config('zen-logo-position') is same as ('center') %} mr-auto{% endif %}">
  97.                                         <div class="search-toggle">
  98.                                             <button class="btn header-actions-btn search-toggle-btn js-search-toggle-btn collapsed"
  99.                                                     type="button"
  100.                                                     {% if theme_config('zen-search-style') is same as('overlay') %}
  101.                                                         data-toggle="overlay"
  102.                                                     {% else %}
  103.                                                         data-toggle="collapse"
  104.                                                         data-target="#searchCollapse"
  105.                                                         aria-expanded="false"
  106.                                                         aria-controls="searchCollapse"
  107.                                                     {% endif %}
  108.                                                     aria-label="{{ "header.searchButton"|trans|striptags }}">
  109.                                                 {% sw_icon 'search' %}
  110.                                                 {% sw_icon 'x' style { 'class': 'search-close d-none' } %}
  111.                                             </button>
  112.                                         </div>
  113.                                     </div>
  114.                                 {% endblock %}
  115.                                 {% if config('core.cart.wishlistEnabled') %}
  116.                                     {% block layout_header_actions_wishlist %}
  117.                                         <div class="col-auto">
  118.                                             <div class="header-wishlist">
  119.                                                 <a class="btn header-wishlist-btn header-actions-btn"
  120.                                                    href="{{ path('frontend.wishlist.page') }}"
  121.                                                    title="{{ 'header.wishlist'|trans|striptags }}"
  122.                                                    aria-label="{{ 'header.wishlist'|trans|striptags }}">
  123.                                                     {% sw_include '@Storefront/storefront/layout/header/actions/wishlist-widget.html.twig' %}
  124.                                                 </a>
  125.                                             </div>
  126.                                         </div>
  127.                                     {% endblock %}
  128.                                 {% endif %}
  129.                                 {% block layout_header_actions_account %}
  130.                                     <div class="col-auto">
  131.                                         <div class="account-menu">
  132.                                             {% sw_include '@Storefront/storefront/layout/header/actions/account-widget.html.twig' %}
  133.                                         </div>
  134.                                     </div>
  135.                                 {% endblock %}
  136.                                 {% block layout_header_actions_cart %}
  137.                                     <div class="col-auto">
  138.                                         <div class="header-cart"
  139.                                              data-offcanvas-cart="true">
  140.                                             <a class="btn header-cart-btn header-actions-btn"
  141.                                                href="{{ path('frontend.checkout.cart.page') }}"
  142.                                                data-cart-widget="true"
  143.                                                title="{{ 'checkout.cartTitle'|trans|striptags }}"
  144.                                                aria-label="{{ 'checkout.cartTitle'|trans|striptags }}">
  145.                                                 {% sw_include '@Storefront/storefront/layout/header/actions/cart-widget.html.twig' %}
  146.                                             </a>
  147.                                         </div>
  148.                                     </div>
  149.                                 {% endblock %}
  150.                                 {% block zen_layout_header_top_bar_toggle %}
  151.                                     {# marketingBannerId is needed for storagekey invalidation #}
  152.                                     {% set marketingBanner = [] %}
  153.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingActive')]|merge(marketingBanner) %}
  154.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingText')]|merge(marketingBanner) %}
  155.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingButtonText')]|merge(marketingBanner) %}
  156.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingButtonLink')]|merge(marketingBanner) %}
  157.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingButtonTarget')]|merge(marketingBanner) %}
  158.                                     {% set marketingBannerId = marketingBanner|json_encode()|length %}
  159.                                     {% set zenCollapseTopBarOptions = {
  160.                                         id: topBarStyle ~ '-' ~ marketingBannerId,
  161.                                         type: topBarStyle
  162.                                     } %}
  163.                                     {% if topBarStyle is not same as ('default') and topBarStyle is not same as ('hidden')  %}
  164.                                         {% if theme_config('zen-header-style') is not same as ('two-line') or (theme_config('zen-header-style') is same as ('two-line') and config('zenitPlatformHorizon.config.marketingActive')) %}
  165.                                             <div class="col-auto d-none d-lg-block">
  166.                                                 <div class="top-bar-toggle">
  167.                                                     <button class="btn header-actions-btn top-bar-toggle-btn"
  168.                                                             type="button"
  169.                                                             aria-label="{{ "zentheme.general.moreLink"|trans|striptags }}"
  170.                                                         {% if topBarStyle is same as ('offcanvas') %}
  171.                                                             data-offcanvas-top-bar="true"
  172.                                                         {% endif %}
  173.                                                         {% if topBarStyle is same as ('collapsible') %}
  174.                                                             data-toggle="collapse"
  175.                                                             data-target="#topBarCollapse"
  176.                                                             aria-expanded="true"
  177.                                                             data-zen-collapse-top-bar-options="{{ zenCollapseTopBarOptions|json_encode }}"
  178.                                                         {% endif %}
  179.                                                         {% if topBarStyle is same as ('expandable') %}
  180.                                                             data-toggle="collapse"
  181.                                                             data-target="#topBarCollapse"
  182.                                                             aria-expanded="false"
  183.                                                             data-zen-collapse-top-bar-options="{{ zenCollapseTopBarOptions|json_encode }}"
  184.                                                         {% endif %}>
  185.                                                         {% if theme_config('zen-main-navigation-style') is same as ('offcanvas-lg')
  186.                                                             or theme_config('zen-main-navigation-style') is same as ('offcanvas-xl')
  187.                                                             or theme_config('zen-header-style') is same as ('single-line') and theme_config('zen-logo-position') is same as ('center') and theme_config('zen-header-style-mobile') is same as ('single-line') %}
  188.                                                             {% sw_icon 'more-vertical' %}
  189.                                                         {% else %}
  190.                                                             {% sw_icon 'stack' %}
  191.                                                         {% endif %}
  192.                                                     </button>
  193.                                                 </div>
  194.                                             </div>
  195.                                         {% endif %}
  196.                                     {% endif %}
  197.                                 {% endblock %}
  198.                             </div>
  199.                         </div>
  200.                     {% endblock %}
  201.                 </div>
  202.             </div>
  203.             {% block layout_header_search_expandable %}
  204.                 {% if theme_config('zen-search-style') is same as('expandable') %}
  205.                     <div class="header-search-col">
  206.                         {% sw_include '@Storefront/storefront/layout/header/search.html.twig' %}
  207.                     </div>
  208.                 {% endif %}
  209.             {% endblock %}
  210.         </div>
  211.     {% endblock %}
  212. {% endblock %}