custom/plugins/FullscreenMenu/src/Resources/views/storefront/layout/navigation/navigation.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  2. {% block layout_main_navigation %}
  3.     <script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
  4.     <script>
  5.         var j$ = jQuery.noConflict();
  6.         j$(document).ready(function(){
  7.             j$("#fullscreen-nav-toggle").click(function(){
  8.                 j$("body").toggleClass("open");
  9.                 j$("#nav-icon").toggleClass('clicked');
  10.                 j$(".fullscreen-nav").fadeToggle();
  11.             });
  12.         });
  13.     </script>
  14.     <div class="fullscreen-nav">
  15.         
  16.         <div class="fullscreen-nav-inner">
  17.             {% block layout_main_navigation_menu_items %}
  18.                 {% set activePath = page.header.navigation.active.path %}
  19.                 {% for treeItem in page.header.navigation.tree %}
  20.                     <div class="fullscreen-nav-item">
  21.                         {% set category = treeItem.category %}
  22.                         {% set name = category.translated.name %}
  23.                         {# @deprecated tag:v6.5.0 - Use "category.id" directly instead. #}
  24.                         {% set categorId = category.id %}
  25.                         {% block layout_main_navigation_menu_item %}
  26.                             {% if category.type == 'folder' %}
  27.                                 <div class="nav-link main-navigation-link"
  28.                                     {% if treeItem.children|length > 0 %}
  29.                                         data-flyout-menu-trigger="{{ category.id }}"
  30.                                     {% endif %}
  31.                                         title="{{ name }}">
  32.                                     <div class="main-navigation-link-text">
  33.                                         <span itemprop="name">{{ name }}</span>
  34.                                     </div>
  35.                                 </div>
  36.                             {% else %}
  37.                                 <a class="nav-link main-navigation-link{% if category.id == page.header.navigation.active.id or category.id in activePath %} active{% endif %}"
  38.                                     href="{{ category_url(category) }}"
  39.                                     itemprop="url"
  40.                                     {% if treeItem.children|length > 0 %}data-flyout-menu-trigger="{{ category.id }}"{% endif %}
  41.                                     {% if category_linknewtab(category) %}target="_blank"{% endif %}
  42.                                     title="{{ name }}">
  43.                                     <div class="main-navigation-link-text">
  44.                                         <span itemprop="name">{{ name }}</span>
  45.                                     </div>
  46.                                 </a>
  47.                             {% endif %}
  48.                         {% endblock %}
  49.                     </div>
  50.                 {% endfor %}
  51.             {% endblock %}
  52.         </div>
  53.     </div>
  54. {% endblock %}