templates/home/blocks/espaces.html.twig line 1

Open in your IDE?
  1. <section id="espaces">
  2.     <div class="container mb-5">
  3.         {% if data.title is defined %}<h2 class="red">{{ data.title }}</h2>{% endif %}
  4.     </div>
  5.     <div class="row container container-espaces p-0">
  6.         {% set nbLoop = 0 %}
  7.         {% for block in data.sub_blocks %}
  8.             {% if loop.first or loop.index == 4 or loop.index == 5 %}
  9.                 {% set nbLoop = nbLoop + 1 %}
  10.                 <div class="col-md-4 column-{{ nbLoop }} p-0 espaces">
  11.             {% endif %}
  12.                 <a href="{{ block.button_link }}" class="col-md-12">
  13.                     <span class="bg-espace" style="background:url({% if block.img_background is defined %}{{ asset('uploads/'~block.img_background.0) }}{% else %}{{ asset('img/espace-single.png') }}{% endif %})no-repeat center;">
  14.                         <span class="d-flex justify-content-center align-items-end h-100 pb-3">
  15.                             <span class="btn-round btn-red-bg-white h-auto">{{ block.button_label }}</span>
  16.                         </span>
  17.                     </span>
  18.                 </a>
  19.             {% if loop.index == 3 or loop.index == 4 or loop.index == 6 %}
  20.                 </div>
  21.             {% endif %}
  22.         {% endfor %}
  23.     </div>
  24. </section>