templates/api/blocks/experience-preview-content.html.twig line 1

Open in your IDE?
  1. {% if hits|length > 0 and hits != "Aucune fiche experience trouvée." %}
  2.     <div class="splide-photo splide" aria-label="En lien avec">
  3.         <div class="splide__track">
  4.             <ul class="splide__list mb-3p5em">
  5.                 {% for i, experience in hits %}
  6.                     <li class="splide__slide acteur-slide">
  7.                         <div class="preview-container br8 dflex fdc">
  8.                             <div class="preview-header">
  9.                                 {% if experience.document.fields.header_img.value.id is defined and experience.document.fields.header_img.value.id is not empty %}
  10.                                     {% set img = sulu_resolve_media(experience.document.fields.header_img.value.id, 'fr') %}
  11.                                     {% include "blocks/previews/img/image.html.twig" %}
  12.                                 {% else %}
  13.                                     {% include "blocks/previews/img/default-image.html.twig" %}
  14.                                 {% endif %}
  15.                                 <p class="fs14 lh20 dflex aic">
  16.                                     Expériences
  17.                                 </p>
  18.                             </div>
  19.                             <div class="preview-contentdflex fdc">
  20.                                 {% if experience.document.excerptCategories is defined and experience.document.fields.excerptCategories is not empty %}
  21.                                     {% set categories = experience.fields.document.excerptCategories %}
  22.                                     {% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
  23.                                 {% endif %}
  24.                                 <a href="{{ sulu_content_path(experience.document.url) }}" class="cblue nodeco">
  25.                                     <div class="fw500 fs20 preview-h3 lh28 mt-8px">
  26.                                         {{ experience.document.title }}
  27.                                     </div>
  28.                                 </a>
  29.                                 {% if  experience.document.fields.departement.value is defined and  experience.document.fields.departement.value is not empty %}
  30.                                     <div class="departement cwhite fs10">
  31.                                         <span class="dpt">{{ experience.document.fields.departement.value }}</span>
  32.                                     </div>
  33.                                 {% endif %}
  34.                                 <div class="mta">
  35.                                     {% if experience.document.fields.authored.value is defined and experience.document.fields.authored.value is not empty %}
  36.                                         <span class="cgrey fs14 lh20">Publié le
  37.                                             {{ experience.document.fields.authored.value|format_datetime('short', 'none', locale='fr') }}
  38.                                         </span>
  39.                                     {% endif %}
  40.                                 </div>
  41.                             </div>
  42.                         </div>
  43.                     </li>
  44.                 {% endfor %}
  45.             </ul>
  46.         </div>
  47.     </div>
  48. {% else %}
  49.     <div>Aucune expérience identifiée sur ce territoire</div>
  50. {% endif %}