templates/front/layout/index.html.twig line 1

Open in your IDE?
  1. {% extends 'front/base.html.twig' %}
  2. {% block seo %}
  3.     {% include 'front/partials/seo.html.twig' %}
  4.     {% include 'front/partials/social.html.twig' %}
  5. {% endblock seo %}
  6. {% block stylesheet %}{{ parent() }}{% endblock stylesheet %}
  7. {% block layout %}
  8.     {% set properties = page.contentProperties %}
  9.     {% include 'front/heroes/hero-list.html.twig' %}
  10.     
  11.     <div class="fluid-grid pt-10 md:pt-20" js-tabs>
  12.         {% set federations = generate_index() %}
  13.         <h2 class="title title--L text-violet-dark font-light mb-6 md:mb-8">
  14.             Découvrez nos
  15.             <span>fédérations adhérentes</span>
  16.         </h2>
  17.         {# index nav #}
  18.         <div class="index-nav-wrap">
  19.             <div class="index-nav" js-horizontal-slide>
  20.                 <ul class="flex items-center" js-horizontal-slide-content>
  21.                     {% set isInit = false %}
  22.                     {% for letter, values in federations %}
  23.                     <li>
  24.                         {% if values|length > 0 %}
  25.                             <button class="index-nav__item {{ not isInit ? 'is-active' : '' }}" js-tabs-tab="{{ loop.index }}">{{ letter }}</button>
  26.                             {% set isInit = true %}
  27.                         {% else %}
  28.                             <span class="index-nav__item">{{ letter }}</span>
  29.                         {% endif %}
  30.                     </li>
  31.                     {% endfor %}
  32.                 </ul>
  33.             </div>
  34.         </div>
  35.         {# tabs with fede list #}
  36.         <div class="tabs mt-12 mb-24">
  37.             {% set isInit = false %}
  38.             {% for letter in federations %}
  39.                 {% if letter|length > 0 %}
  40.                     <div class="tabs__panel {{ not isInit ? 'is-active' : '' }}" js-tabs-content="{{ loop.index }}">
  41.                         <ul class="row index-grid">
  42.                             {% for federation in letter %}
  43.                                 <li class="col-6 md-col-4 lg-col-3">
  44.                                     {% include 'front/partials/cards/federation.html.twig' %}
  45.                                 </li>
  46.                             {% endfor %}
  47.                         </ul>
  48.                     </div>
  49.                     {% set isInit = true %}
  50.                 {% endif %}
  51.             {% endfor %}
  52.         </div>
  53.     </div>
  54.     {% if page.slices|length > 0 %}
  55.     <div>
  56.         {% include 'front/slices/index.html.twig' with {'slices': page.slices} %}
  57.     </div>
  58.     {% endif %}
  59. {% endblock layout %}
  60. {% block javascript %}{{ parent() }}{% endblock javascript %}