vendor/crehler/advanced-menu/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_menu_home %}
  3.     {% if page.header.extensions.productsCategory %}
  4.         <a class="nav-link main-navigation-link"
  5.            href="{{ page.header.extensions.productsCategory.url }}"
  6.            itemprop="url"
  7.            data-flyout-menu-trigger="{{ page.header.extensions.productsCategory.id }}"
  8.            title="{{ page.header.extensions.productsCategory.name|striptags }}">
  9.             <div class="main-navigation-link-text">
  10.                 <span itemprop="name">{{ page.header.extensions.productsCategory.name|sw_sanitize }}</span>
  11.             </div>
  12.         </a>
  13.     {% endif %}
  14. {% endblock %}
  15. {% block layout_main_navigation_menu_flyouts %}
  16.     {% if page.header.extensions.productsCategory %}
  17.         <div class="navigation-flyout cam-flyout"
  18.              data-flyout-menu-id="{{ page.header.extensions.productsCategory.id }}">
  19.             <div class="container">
  20.                 <div class="row navigation-flyout-bar">
  21.                     {% set productsCategorySettings = { 'url': path('frontend.mojebambino.productTree') } %}
  22.                     <div class="col" data-products-category
  23.                          data-products-category-options='{{ productsCategorySettings|json_encode }}'>
  24.                         <div class="cam"
  25.                              :class="{'cam--search': searchActive, 'cam--menu': !searchActive}"
  26.                              :style="{'height': camHeight, 'max-height': menuMaxHeight}"
  27.                         >
  28.                             <div v-if="!isReady" class="cam__loader">
  29.                                 <div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
  30.                             </div>
  31.                             <div class="cam__overflow" :style="overflowTopStyle"></div>
  32.                             <div class="cam__search" v-show="isReady">
  33.                                 <div class="cam_search-inner" :class="{'cam_search-inner--focus': isFocused}">
  34.                                     <input @focusin="onInputFocusIn" @focusout="onInputFocusOut" v-model="search"
  35.                                            @keyup="onSearch" type="search" name="search"
  36.                                            class="form-control cam__search-input" autocomplete="off"
  37.                                            autocapitalize="off" placeholder="Wyszukaj kategorie"
  38.                                            aria-label="Wyszukaj kategorie" maxlength="30">
  39.                                     <div class="cam__search-icon cam__search-icon--x" @click.prevent="onClearSearch">
  40.                                         {% sw_icon 'x' %}
  41.                                     </div>
  42.                                     <div class="cam__search-icon cam__search-icon--search">
  43.                                         {% sw_icon 'search' %}
  44.                                     </div>
  45.                                 </div>
  46.                             </div>
  47.                             <div class="cam__result" v-show="searchActive && isReady">
  48.                                 <div class="cam__result-first" v-for="first in searchResult" v-show="first.show">
  49.                                     <a class="cam__result-first-name" :href="first.url" v-html="first.text"></a>
  50.                                     <div class="cam__result-first-sub">
  51.                                         <div class="cam__result-second" v-for="second in first.childs"
  52.                                              v-show="second.show">
  53.                                             <a class="cam__result-second-name" :href="second.url">
  54.                                                 <span v-html="second.text"></span>
  55.                                                 {% sw_icon 'arrow-head-right' %}
  56.                                             </a>
  57.                                         </div>
  58.                                     </div>
  59.                                 </div>
  60.                             </div>
  61.                             <div class="cam__categories"
  62.                                  v-show="!searchActive && isReady"
  63.                                  @load="calculateStyles"
  64.                                  ref="categories"
  65.                             >
  66.                                 <div class="cam__categories-items"
  67.                                      :class="{'cam__categories-items--show-top': showItemsTopArrow, 'cam__categories-items--show-bottom': showItemsBottomArrow}">
  68.                                     <div class="cam__categories-items-top" v-if="showItemsTopArrow"
  69.                                          @click="onScrollList('top')">
  70.                                         {% sw_icon 'arrow-head-up' %}
  71.                                     </div>
  72.                                     <div class="cam__categories-items-elements" ref="menuElements"
  73.                                          :style="{'max-height': menuElementsMaxHeightPx}"
  74.                                     >
  75.                                         <a v-for="item in tree"
  76.                                            class="cam__categories-item"
  77.                                            :class="{'cam__categories-item--active': (currentId === item.id)}"
  78.                                            @mouseover="onOpenMenu(item.id)"
  79.                                            @mouseleave="onCloseMenu(item.id)"
  80.                                            :href="item.url"
  81.                                         >
  82.                                             <div class="cam__categories-item-image">
  83.                                                 <img v-if="item.icon && item.isSvgIcon"
  84.                                                      class="cam__categories-item-media"
  85.                                                      :src="item.icon"
  86.                                                      data-svg-inject
  87.                                                 />
  88.                                                 <img v-if="item.icon && !item.isSvgIcon"
  89.                                                      class="cam__categories-item-media" :src="item.icon"/>
  90.                                             </div>
  91.                                             <div class="cam__categories-item-text">
  92.                                                 <span class="cam__categories-item-text-inner">${ item.name }</span>
  93.                                             </div>
  94.                                             <div class="cam__categories-item-arrow">
  95.                                                 <span v-if="item.hasChild" class="cam__categories-item-arrow-triangle"></span>
  96.                                                 {% sw_icon 'arrow-head-right' %}
  97.                                             </div>
  98.                                         </a>
  99.                                     </div>
  100.                                     <div class="cam__categories-items-bottom" v-if="showItemsBottomArrow"
  101.                                          @click="onScrollList('bottom')">
  102.                                         {% sw_icon 'arrow-head-down' %}
  103.                                     </div>
  104.                                 </div>
  105.                                 <div class="cam__categories-content" :style="{'max-height': menuContentMaxHeightPx}">
  106.                                     <div
  107.                                             v-for="item in tree"
  108.                                             class="cam__categories-sub"
  109.                                             :class="{'cam__categories-sub--has-background': item.background, 'cam__categories-sub--show': (currentId === item.id && item.hasChild)}"
  110.                                             :style="getCategoryStyle(item)"
  111.                                             @mouseover="onOpenMenu(item.id)"
  112.                                             @mouseleave="onCloseMenu(item.id)"
  113.                                             :ref="item.id"
  114.                                     >
  115.                                         <div v-if="item.hasChild" class="container">
  116.                                             <div class="row">
  117.                                                 <a class="col-12 d-flex" :href="item.url">
  118.                                                     <span class="cam__categories-link">{{ "cradvancedmenu.skipToCategory"|trans|sw_sanitize }} <strong class="cam__categories-link-bold">${ item.name } {% sw_icon 'arrow-head-right' %}</strong></span>
  119.                                                 </a>
  120.                                             </div>
  121.                                             <div class="row">
  122.                                                 <div v-if="item.twoColumn" class="col-12 cam__categories-col cam__categories-col--two-column">
  123.                                                     <div class="cam__categories-subcategory cam__categories-subcategory--childrens">
  124.                                                         <a class="cam__categories-subcategory-name"
  125.                                                            :href="item.categoryLeft.url">
  126.                                                             ${ item.categoryLeft.name }
  127.                                                         </a>
  128.                                                         <div class="cam__categories-subcategories">
  129.                                                             <div v-for="column in item.columnLeft" class="cam__categories-subcategories-col" :style="{ width: item.categoryLeft.columnWidth}">
  130.                                                                 <a v-for="sub in column" :href="sub.url"
  131.                                                                    class="cam__categories-child" :class="[{'cam__category-highlighted': sub.isHighlighted}, sub.isHighlightedColor]">
  132.                                                                     <span>${ sub.name }</span>
  133.                                                                 </a>
  134.                                                             </div>
  135.                                                         </div>
  136.                                                     </div>
  137.                                                     <div class="cam__categories-subcategory cam__categories-subcategory--childrens">
  138.                                                         <a class="cam__categories-subcategory-name"
  139.                                                            :href="item.categoryRight.url">
  140.                                                             ${ item.categoryRight.name }
  141.                                                         </a>
  142.                                                         <div class="cam__categories-subcategories">
  143.                                                             <div v-for="column in item.columnRight" class="cam__categories-subcategories-col" :style="{ width: item.categoryRight.columnWidth}">
  144.                                                                 <a v-for="sub in column" :href="sub.url"
  145.                                                                    class="cam__categories-child" :class="[{'cam__category-highlighted': sub.isHighlighted}, sub.isHighlightedColor]">
  146.                                                                     <span>${ sub.name }</span>
  147.                                                                 </a>
  148.                                                             </div>
  149.                                                         </div>
  150.                                                     </div>
  151.                                                 </div>
  152.                                                 <div v-else class="col-12 cam__categories-col">
  153.                                                     <div class="cam__categories-subcategory cam__categories-subcategory--childrens">
  154.                                                         <div class="cam__categories-subcategories cam__categories-subcategories--4">
  155.                                                             <div v-for="column in item.chunk" class="cam__categories-subcategories-col" :style="{ width: item.columnWidth}">
  156.                                                                 <a v-for="sub in column" :href="sub.url"
  157.                                                                    class="cam__categories-child" :class="[{'cam__category-highlighted': sub.isHighlighted}, sub.isHighlightedColor]">
  158.                                                                     <span>${ sub.name }</span>
  159.                                                                 </a>
  160.                                                             </div>
  161.                                                         </div>
  162.                                                     </div>
  163.                                                 </div>
  164.                                             </div>
  165.                                         </div>
  166.                                     </div>
  167.                                 </div>
  168.                             </div>
  169.                         </div>
  170.                     </div>
  171.                 </div>
  172.             </div>
  173.         </div>
  174.     {% endif %}
  175.     {{ parent() }}
  176. {% endblock %}