templates/navigation/tabs.html.twig line 1

Open in your IDE?
  1. {% set dropdownOnMobile = true %}
  2. <ul class="nav {{ dropdownOnMobile ? 'd-md-flex d-none' : '' }} list-unstyled tabbing-animations-wrapper js-tabbing-animations-wrapper custom-scrollbar nav-tabs {{ className|default('') }}" {% if isTabbing|default(false) %}role="tablist"{% endif %}>
  3.     {% for tab in items|default([]) %}
  4.         <li class="nav-item js-tabbing-slider-nav-item">
  5.             <a class="nav-link js-tabbing-animations-link {{ tab.isActive ? 'js-tabbing-animations-link-active': '' }} {{ tab.isActive ? 'active': '' }} {{ isDynamicTabbing|default(false) ? 'js-dynamic-tabbing__toggle' : ''}}"
  6.                data-content-url="{{ tab.contentUrl }}"
  7.                 {% if tab.isActive %}aria-current="page"{% endif %}
  8.                 {% if tab.id is defined %}id="{{ tab.id }}"{% endif %}
  9.                 {% if isTabbing|default(false) %}
  10.                     href="#{{ tab.targetId }}"
  11.                     data-bs-toggle="tab"
  12.                     data-height="false"
  13.                     role="tab"
  14.                     aria-controls="{{ tab.targetId }}"
  15.                     aria-selected="{{ tab.isActive ? 'true': 'false' }}"
  16.                 {% else %}
  17.                     href="{{ tab.href }}"
  18.                 {% endif %}>
  19.                 {{ tab.text|raw }}
  20.             </a>
  21.         </li>
  22.     {% endfor %}
  23.     <div class="tabbing-animations-indicator js-tabbing-animations-indicator"></div>
  24. </ul>
  25. {% if dropdownOnMobile %}
  26.     {% set activeOption = ''  %}
  27.     <div class="dropdown mb-4 d-md-none js-tabbing-dropdown px-0">
  28.         <ul class="dropdown-menu nav tabbing-dropdown">
  29.             {% for tab in items|default([]) %}
  30.                 {% if tab.isActive %}
  31.                     {% set activeOption = tab.text|raw  %}
  32.                 {% endif %}
  33.                 <li class="dropdown-item nav-item p-0">
  34.                     <a class="nav-link tabbing-dropdown__item js-tabbing-dropdown__item {{ tab.isActive ? 'active': '' }} {{ isDynamicTabbing|default(false) ? 'js-dynamic-tabbing__toggle' : ''}}"
  35.                        data-content-url="{{ tab.contentUrl }}"
  36.                        {% if tab.isActive %}aria-current="page"{% endif %}
  37.                         {% if tab.id is defined %}id="{{ tab.id }}"{% endif %}
  38.                         {% if isTabbing|default(false) %}
  39.                         href="#{{ tab.targetId }}"
  40.                         data-bs-toggle="tab"
  41.                         data-height="false"
  42.                         role="tab"
  43.                         aria-controls="{{ tab.targetId }}"
  44.                         aria-selected="{{ tab.isActive ? 'true': 'false' }}"
  45.                     {% else %}
  46.                         href="{{ tab.href }}"
  47.                         {% endif %}>
  48.                         {{ tab.text|raw }}
  49.                     </a>
  50.                 </li>
  51.             {% endfor %}
  52.         </ul>
  53.         <button class="btn btn-outline dropdown-toggle js-tabbing-dropdown__active-item tabbing-dropdown__button" type="button" data-bs-toggle="dropdown" aria-expanded="false">
  54.             {{ activeOption }}
  55.         </button>
  56.     </div>
  57. {% endif %}