templates/includes/mobile-nav.html.twig line 1

  1. <div class="mobile-nav" x-show="showMobileNav" x-transition x-cloak>
  2.     <div class="mobile-nav__wrap">
  3.         <div class="mobile-nav__background">
  4.             <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 375 1047">
  5.                 <path d="M-337.621 116.309L1764 1329M-337.621 1057.67L1764-155M1765.92 1057.84L-336.001-155M61.853 1329L-336.002-155M61.853 1329V-155M-336.002 1329.9L521.27-155M1764.82 116.781L-336.001 1329M61.853-155l-397.855 1484M61.853-155v1484M-336.002-155.922L521.269 1329" stroke="#00F" stroke-miterlimit="10" />
  6.             </svg>
  7.         </div>
  8.         <div class="mobile-nav__container">
  9.             <div class="mobile-nav__header">
  10.                 <div class="mobile-nav__close" @click="showMobileNav = false">
  11.                     <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  12.                         <path d="M13.5 2.5L2.5 13.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" />
  13.                         <path d="M2.5 2.5L13.5 13.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" />
  14.                     </svg>
  15.                 </div>
  16.             </div>
  17.             <nav class="mobile-nav__nav">
  18.                 {# <!-- Fly-Out Navigation --> #}
  19.                 {% set flyout = flyout() %}
  20.                 {% set currentFlyout = (flyout is not empty and flyout[app.request.locale] is defined) ? flyout[app.request.locale] : [] %}
  21.                 {% set flyoutPages = currentFlyout is not empty ? currentFlyout|keys : [] %}
  22.                 {% set mainNavigation = sulu_navigation_root_tree('main') %}
  23.                 {% for item in mainNavigation %}
  24.                     {% if item.url in flyoutPages %}
  25.                         {% set flyoutPage = currentFlyout[item.url] %}
  26.                         {% if flyoutPage['layout'] == 'Layout 1' %}
  27.                             {% include '/includes/navigation/layout1_mobile.html.twig' %}
  28.                         {% elseif flyoutPage['layout'] == 'Layout 2' %}
  29.                             {% include 'includes/navigation/layout2_mobile.html.twig' %}
  30.                         {% else %}
  31.                             {% include 'includes/navigation/layout3_mobile.html.twig' %}
  32.                         {% endif %}
  33.                     {% else %}
  34.                         <a class="mobile-nav__link" href="{{ sulu_content_path(item.url, item.webspaceKey) }}" title="{{ item.title }}" >{{ item.title }}</a>
  35.                     {% endif %}
  36.                 {% endfor %}
  37.             </nav>
  38.         </div>
  39.     </div>
  40. </div>