themes/BootstrapChildTheme/SyliusShopBundle/views/Taxon/_main_menu_horizontal.html.twig line 1

Open in your IDE?
  1. {% macro item(taxon, isChild) %}
  2.     {% import _self as macros %}
  3.     {% if taxon.enabledChildren|length > 0 and taxon.level == 1 %}
  4.         <li class="nav-item item-wrap subnav" {{ sylius_test_html_attribute('menu-item') }}>
  5.             <a class="nav-link subnav-nav-link" href="{{ path('sylius_shop_product_index', {'slug': taxon.redirect ?: taxon.slug, '_locale': taxon.translation.locale}) }}" {#role="button" data-bs-toggle="dropdown"#}>
  6.                 {% if taxon.icon %}
  7.                     {#<span class="nav-icon">#}
  8.                         {{ taxon.icon|raw }}
  9.                     {#</span>#}
  10.                 {% endif %}
  11.                 {{ taxon.name }}
  12.                 <svg class="icon subnav-caret bi-chevron-right" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true">
  13.                     <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
  14.                 </svg>
  15.             </a>
  16.             {#<button class="btn-subnav" type="button" aria-expanded="false">
  17.                 <svg class="icon" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.053,18.12,13.173,12,7.053,5.88,8.947,4l8,8-8,8Z'/></svg>
  18.                 <span class="visually-hidden">Toggle Dropdown</span>
  19.             </button>#}
  20.             <ul class="nav nav-nested">
  21.                 {% for childTaxon in taxon.enabledChildren %}
  22.                     {{ macros.item(childTaxon, true) }}
  23.                 {% endfor %}
  24.             </ul>
  25.         </li>
  26.     {% else %}
  27.         <li class="nav-item item-wrap">
  28.             <a href="{{ path('sylius_shop_product_index', {'slug': taxon.redirect ?: taxon.slug, '_locale': taxon.translation.locale}) }}"
  29.                class="nav-link" {{ sylius_test_html_attribute('menu-item') }}>
  30.                 {% if taxon.icon %}
  31.                     {#<span class="nav-icon">#}
  32.                         {{ taxon.icon|raw }}
  33.                     {#</span>#}
  34.                 {% endif %}
  35.                 {{ taxon.name }}
  36.             </a>
  37.         </li>
  38.     {% endif %}
  39. {% endmacro %}
  40. {% import _self as macros %}
  41. {% if taxons|length > 0 %}
  42.     <div id="mainNavbar" class="offcanvas offcanvas-start mt-lg-5" tabindex="-1">
  43.         <div class="offcanvas-header border-bottom">
  44.             <a href="{{ path('sylius_shop_homepage') }}" class="logo-link">
  45.                 <img class="logo" src="{{ asset('build/shop-bs/images/sudekusa_logo.webp', 'bootstrapTheme') }}" width="1075" height="225" alt="{{ 'app.ui.header.logo'|trans }}">
  46.             </a>
  47.             <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="{{ 'app.ui.close'|trans }}"></button>
  48.         </div>
  49.         <div class="offcanvas-body">
  50.             <ul class="navbar-nav flex-md-fill justify-content-md-between">
  51.                 {# All Categories Taxon #}
  52.                 {{ render(url('sylius_shop_partial_taxon_show_by_slug', {'slug': 'all-categories', 'template': '@SyliusShop/Taxon/MainMenu/_main_menu_all_categories.html.twig'})) }}
  53.                 {% for taxon in taxons %}
  54.                     {{ macros.item(taxon, false) }}
  55.                 {% endfor %}
  56.             </ul>
  57.         </div>
  58.         <div class="offcanvas-footer border-top text-center">
  59.             <a class="header-btn phone-btn" href="tel:9087515332">
  60.                 <svg class="icon icon-xl bi-telephone" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true">
  61.                     <path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z"/>
  62.                 </svg>
  63.                 <span class="btn-text">908-751-5332</span>
  64.             </a>
  65.             <a class="header-btn help-btn" href="{{ path('sylius_shop_contact_request') }}">
  66.                 <svg class="icon bi-question-diamond" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true">
  67.                     <path d="M6.95.435c.58-.58 1.52-.58 2.1 0l6.515 6.516c.58.58.58 1.519 0 2.098L9.05 15.565c-.58.58-1.519.58-2.098 0L.435 9.05a1.482 1.482 0 0 1 0-2.098L6.95.435zm1.4.7a.495.495 0 0 0-.7 0L1.134 7.65a.495.495 0 0 0 0 .7l6.516 6.516a.495.495 0 0 0 .7 0l6.516-6.516a.495.495 0 0 0 0-.7L8.35 1.134z"/>
  68.                     <path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>
  69.                 </svg>
  70.                 <span class="btn-text">{{ 'app.ui.header.help'|trans }}</span>
  71.             </a>
  72.         </div>
  73.     </div>
  74. {% endif %}