custom/static-plugins/NdTheme/src/Resources/views/storefront/layout/header/header.html.twig line 1

Open in your IDE?
  1. {% block layout_header %}
  2.     {% set extraMenuData = page.header.extensions.additional_menus.get("HeaderBottomQuickMenu").elements %}
  3.     {% block layout_top_bar %}
  4.         {% sw_include '@Storefront/storefront/layout/header/top-bar.html.twig' %}
  5.     {% endblock %}
  6.     {% block layout_header_navigation %}
  7.         <div class="header-container relative grid grid-cols-3 md:grid-cols-10 grid-gap-2 items-center p-2 pt-3 boxed-layout md:mb-0 md:px-0">
  8.             {% block header_navigation_control_container %}
  9.                 <div class="header-navigation flex grid-gap-3 overflow-hidden items-center md:col-span-4">
  10.                     {% block layout_header_navigation_toggle %}
  11.                         <div class="header-menu-toggle shrink-0">
  12.                             <div class="ml-6 menu-button">
  13.                                 {% block layout_header_navigation_toggle_button %}
  14.                                     <button class="btn-toggle flex grid-gap-2 items-center md:pl-0"
  15.                                             type="button"
  16.                                             data-offcanvas-menu="true"
  17.                                             aria-label="{{ "general.menuLink"|trans|striptags }}">
  18.                                         {% block layout_header_navigation_toggle_button_icon %}
  19.                                             {% sw_icon 'menu' style { 'pack': 'theme-icons', 'class': ' w-6 h-6' } %}
  20.                                         {% endblock %}
  21.                                     </button>
  22.                                 {% endblock %}
  23.                             </div>
  24.                         </div>
  25.                     {% endblock %}
  26.                 </div>
  27.             {% endblock %}
  28.             {% block layout_header_logo %}
  29.                 {% sw_include '@Storefront/storefront/layout/header/logo.html.twig' %}
  30.             {% endblock %}
  31.             {% block layout_header_actions_container %}
  32.                 <div class="header-actions flex justify-center gap-2 items-center  md:col-span-2 md:order-2">
  33.                     {% block layout_header_actions_account %}
  34.                         <div class="account-menu relative md:flex group"
  35.                         >
  36.                             <a class="btn-toggle flex items-center grid-gap-2 text-xs"
  37.                                href="{{ path('frontend.account.login.page') }}"
  38.                                title="{{ "account.orRegisterLink"|trans|striptags }}">
  39.                                 {% sw_icon 'account' style { 'pack': 'theme-icons', 'class': ' w-6 h-6' } %}
  40.                                 {{ context.customer.firstName }} {% if context.customer.guest %}({{ "themeGlobal.guestAccount"|trans|sw_sanitize }}){% endif %}
  41.                             </a>
  42.                             {% if context.customer.firstName|length > 0 %}
  43.                                 <script>
  44.                                     window.dataLayer = window.dataLayer || [];
  45.                                     window.dataLayer.push({
  46.                                         'firstname': '{{ context.customer.firstName }}',
  47.                                         'lastname': '{{ context.customer.lastName }}',
  48.                                         'address1': '{{ context.customer.defaultBillingAddress.street }}',
  49.                                         'address2': '{{ context.customer.defaultBillingAddress.additionalAddressLine1 }}',
  50.                                         'city': '{{ context.customer.defaultBillingAddress.city }}',
  51.                                         'zip': '{{ context.customer.defaultBillingAddress.zipcode }}',
  52.                                         'country': '{{ context.customer.defaultBillingAddress.country.iso }}',
  53.                                         'email': '{{ context.customer.email }}',
  54.                                         'phone': '{{ context.customer.phone }}'
  55.                                     });
  56.                                 </script>
  57.                             {% endif %}
  58.                             {% if context.customer.guest %}
  59.                                 <div class="account-guest-abort group-hover:block absolute top-16 left-0 w-full bg-white p-4 border border-current z-50 shadow-sm caret-up text-sm grid grid-gap-3">
  60.                                     {% block page_account_sidebar_guest_abort %}
  61.                                         <a href="{{ path('frontend.account.logout.page') }}"
  62.                                            data-account-guest-abort-button="true"
  63.                                            class="btn w-full">
  64.                                             {% sw_icon 'menu' style { 'pack': 'theme-icons', 'class': ' w-6 h-6' } %}
  65.                                             {{ "account.guestAbort"|trans|sw_sanitize }}
  66.                                         </a>
  67.                                     {% endblock %}
  68.                                 </div>
  69.                             {% endif %}
  70.                         </div>
  71.                     {% endblock %}
  72.                     {% if config('core.cart.wishlistEnabled') %}
  73.                         {% block layout_header_actions_wishlist %}
  74.                             <div class="header-wishlist flex"
  75.                                  data-offcanvas-wishlist="true">
  76.                                 <a class="btn-toggle header-wishlist-btn header-actions-btn"
  77.                                    href="{{ path('frontend.wishlist.page') }}"
  78.                                    title="{{ 'header.wishlist'|trans|striptags }}"
  79.                                    aria-label="{{ 'header.wishlist'|trans|striptags }}">
  80.                                     {% sw_include '@Storefront/storefront/layout/header/actions/wishlist-widget.html.twig' %}
  81.                                 </a>
  82.                             </div>
  83.                         {% endblock %}
  84.                     {% endif %}
  85.                     {% block layout_header_actions_cart %}
  86.                         <div class="header-cart flex"
  87.                              data-offcanvas-cart="true">
  88.                             <a class="btn-toggle header-cart-btn header-actions-btn overflow-visible"
  89.                                href="{{ path('frontend.checkout.cart.page') }}"
  90.                                data-cart-widget="true"
  91.                                title="{{ 'checkout.cartTitle'|trans|striptags }}"
  92.                                aria-label="{{ 'checkout.cartTitle'|trans|striptags }}">
  93.                                 {% sw_include '@Storefront/storefront/layout/header/actions/cart-widget.html.twig' %}
  94.                             </a>
  95.                         </div>
  96.                     {% endblock %}
  97.                 </div>
  98.                 {% block layout_header_actions %}
  99.                     {% block layout_header_search_toggle %}
  100.                         <div class="search col-span-3 md:col-span-2">
  101.                             <div class="search">
  102.                                 {% block layout_header_search %}
  103.                                     <div class="search-container">
  104.                                         {% sw_include '@Storefront/storefront/layout/header/search.html.twig' %}
  105.                                     </div>
  106.                                 {% endblock %}
  107.                             </div>
  108.                         </div>
  109.                     {% endblock %}
  110.                 {% endblock %}
  111.             </div>
  112.         {% endblock %}
  113.         {% block header_extra_menu_data %}
  114.             {% if extraMenuData|length > 0 %}
  115.                 <div class="extraMenuContainer w-full pt-0 p-2 flex grid-gap-4 overflow-x-scroll hide-scrollbar boxed-layout">
  116.                     {% for menuItemData in extraMenuData %}
  117.                         <a href="{{ seoUrl('frontend.navigation.page', {'navigationId': menuItemData.id}) }}"
  118.                            class="flex-shrink-0 text-md">
  119.                             {{ menuItemData.name }}
  120.                         </a>
  121.                     {% endfor %}
  122.                 </div>
  123.             {% endif %}
  124.         {% endblock %}
  125.     {% endblock %}
  126. {% endblock %}