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.                 {% if tab.warnings|default([])|length > 0 %}
  21.                     <span class="facilities-warnings__dot d-none d-md-inline-block"></span>
  22.                 {% endif %}
  23.             </a>
  24.         </li>
  25.     {% endfor %}
  26.     <div class="tabbing-animations-indicator js-tabbing-animations-indicator"></div>
  27. </ul>
  28. {% if dropdownOnMobile %}
  29.     {% set activeOption = ''  %}
  30.     <div class="dropdown mb-4 d-md-none js-tabbing-dropdown px-0">
  31.         <span class="fz16">{{ 'tabbing.dropdown.select'|trans }}:</span>
  32.         <ul class="dropdown-menu nav tabbing-dropdown">
  33.             {% for tab in items|default([]) %}
  34.                 {% if tab.isActive %}
  35.                     {% set activeOption = tab.text|raw  %}
  36.                 {% endif %}
  37.                 <li class="dropdown-item nav-item p-0">
  38.                     <a class="nav-link tabbing-dropdown__item js-tabbing-dropdown__item {{ tab.isActive ? 'active': '' }} {{ isDynamicTabbing|default(false) ? 'js-dynamic-tabbing__toggle' : ''}}"
  39.                        data-content-url="{{ tab.contentUrl }}"
  40.                        {% if tab.isActive %}aria-current="page"{% endif %}
  41.                         {% if tab.id is defined %}id="{{ tab.id }}"{% endif %}
  42.                         {% if isTabbing|default(false) %}
  43.                         href="#{{ tab.targetId }}"
  44.                         data-bs-toggle="tab"
  45.                         data-height="false"
  46.                         role="tab"
  47.                         aria-controls="{{ tab.targetId }}"
  48.                         aria-selected="{{ tab.isActive ? 'true': 'false' }}"
  49.                     {% else %}
  50.                         href="{{ tab.href }}"
  51.                         {% endif %}>
  52.                         {{ tab.text|raw }}
  53.                     </a>
  54.                 </li>
  55.             {% endfor %}
  56.         </ul>
  57.         <button class="btn btn-outline dropdown-toggle js-tabbing-dropdown__active-item tabbing-dropdown__button" type="button" data-bs-toggle="dropdown" aria-expanded="false">
  58.             {{ activeOption }}
  59.         </button>
  60.     </div>
  61. {% endif %}