templates/layout/navigation/navbar.html.twig line 1

Open in your IDE?
  1. {% set navpages = build_main_nav(document).pages|filter(page => page.visible) %}
  2. {# Menu Desktop #}
  3. <nav class="flex items-center justify-end flex-1 mt-5">
  4.     <ul class="flex flex-row items-center justify-around text-xl uppercase gap-x-5 xl:gap-x-10">
  5.         {% for page in navpages %}
  6.             <li class="relative flex items-center group">
  7.                 <a class="pt-2 relative pb-2 text-sm tracking-widest flex items-center space-x-2 font-headline {{ page.active or document.href == page.document.href ? 'font-medium' : 'font-normal' }}" href="{{ page.href }}" target="{{ page.target }}">
  8.                     {# prettier-ignore #}
  9.           {# {% include 'icons/' ~ page.customSetting('mainNavigationIcon') ~ '.svg.twig' ignore missing with {
  10.                         class: 'h-5 w-5 inline-block text-primary flex-shrink-0'
  11.                     } %} #}
  12.                     <span class="mt-1">{{ page.label }}</span>
  13.           {% if page.pages %}
  14.             <span>{% include 'icons/arrow-right.svg.twig' with { class: 'w-4 rotate-90' } %}</span>
  15.             <div class="absolute bottom-0 z-10 hidden w-6 h-6 -mb-px overflow-hidden -translate-x-1/2 group-hover:block left-1/2">
  16.               {# <div class="w-6 h-6 origin-bottom-left transform rotate-45 bg-neutral-50 "></div> #}
  17.             </div>
  18.           {% endif %}
  19.                 </a>
  20.           {% if page.pages %}
  21.            {% include 'layout/navigation/megamenu.html.twig' with { page: page } only %}
  22.           {% endif %}
  23.             </li>
  24.         {% endfor %}
  25.     <li class="flex items-center">
  26.       <a class="flex items-center px-4 pt-4 pb-4 space-x-3 bg-primary" href="{{ path('search_index', { 'form[q]': 'search.keywords.news' | trans }) }}" name="{{ 'search' | trans }}">
  27.         {% include 'icons/search.svg.twig' ignore missing with {
  28.           class: 'h-5 w-5 inline-block text-white flex-shrink-0'
  29.         } %}
  30.       </a>
  31.     </li>
  32.     </ul>
  33. </nav>