templates/home/categories.html.twig line 1

  1. <section class="section2">
  2.     <div class="container">
  3.         <h2>Les protocoles LODEAO</h2>
  4.         <div class="swiper margin-top-30">
  5.           <div class="swiper-wrapper">
  6.             {% set noimg = 0 %}
  7.             {% for proto in categories|sort((a, b) => a.titre <=> b.titre) %}
  8.                 {% if proto.titre != 'Urgences' %}
  9.                     {% set noimg = noimg + 1 %}
  10.                     {% if noimg >6 %} {% set noimg = 1 %} {% endif %}
  11.                     <div class="swiper-slide">
  12.                         <div class="swiper-slide-content" onmouseenter="activerimg({{ proto.id }})" onmouseleave="desactiverimg({{ proto.id }})" >
  13.                             <div style="position:relative;">
  14.                                 <a href="{{ path('categoriefiltre_page', {'type': 1, 'code': proto.id}) }}">
  15.                                 <div class="img-content">
  16.                                     {% if proto.image is empty %}
  17.                                     <img id="img{{ proto.id }}" class="img{{ noimg }}" src="{{ asset('assets/img/categories/') }}categorie.jpg" />
  18.                                     {% else %}
  19.                                     <img id="img{{ proto.id }}" class="img{{ noimg }}" src="{{ proto.image }}" />
  20.                                     {% endif %}
  21.                                 </div>
  22.                                 <h3>{{ proto.titre|replace({' ': '<br/>'})|raw }}</h3>
  23.                                 </a>
  24.                             </div>
  25.                             <div> 
  26.                                 <a href="{{ path('categoriefiltre_page', {'type': 1, 'code': proto.id}) }}">     
  27.                                 <p class="text-center">{{ proto.resume }}</p></a>
  28.                                 <a id="about{{ proto.id }}" class="about" href="{{ path('categoriefiltre_page', {'type': 1, 'code': proto.id}) }}">Plus d'info</a>
  29.                             </div>
  30.                         </div>
  31.                     </div>
  32.                 {% endif %}
  33.             {% endfor %}
  34.             
  35.           </div>
  36.           <div class="swiper-button-next"></div>
  37.           <div class="swiper-button-prev"></div>
  38.         </div>
  39.         <div class="acces-protocoles">
  40.             AccĂ©dez aux protocoles de gestion des <a href="{{ path('categoriefiltre_page', {'type': 1, 'code':'U'}) }}"><button>URGENCES</button></a>
  41.         </div>
  42.     </div>
  43. </section>