templates/Components/Partials/animationgroupe.html.twig line 1

Open in your IDE?
  1. {% if animationGroupes is not empty %}
  2.     {% for animationGroupe in animationGroupes %}
  3.         <h2>{{ animationGroupe.title }}</h2>
  4.         {{ animationGroupe.content | raw }}
  5.         <div class="grid-container-wrapper">
  6.             <div class="category-animation">
  7.                 <div class="grid-x grid-margin-x align-center">
  8.                     {% for animation in animationGroupe.animations %}
  9.                         {% if animation.images is not empty %}
  10.                             {% set image = vich_uploader_asset(animation.images | first, 'imageFile') | imagine_filter('detail_first_view') %}
  11.                         {% else %}
  12.                             {% set image = asset('images/sample/recipe.jpg') | imagine_filter('detail_first_view_local') %}
  13.                         {% endif %}
  14.                         <div class="cell smedium-6 medium-4">
  15.                             <a {% if animation.type == 'static' %} href="{{ animation.allslug }}" {% else %} href="{{ path(animation.type ~ '_view', {'slug': animation.slug, 'id': animation.id}) }}" {% endif %}>
  16.                                 <div class="animation-item" data-equalizer-watch>
  17.                                     <div class="animation-item__picture">
  18.                                         <img itemprop="image" src="{{ asset('images/sample/img'~ loop.index ~'.png') }}" alt="{{ animation.name }}"/>
  19.                                     </div>
  20.                                     {#FIXME: ajouter une image
  21.                                         <div class="animation-item__picture">
  22.                                             <img itemprop="image" src="{{ image }}" alt="{{ animation.name }}" />
  23.                                         </div>
  24.                                         #}
  25.                                     <div class="animation-item__title">
  26.                                         <h3>{{ animation.name }}</h3>
  27.                                         <p>
  28.                                             {{ animation.content }}
  29.                                         </p>
  30.                                     </div>
  31.                                 </div>
  32.                             </a>
  33.                         </div>
  34.                     {% endfor %}
  35.                 </div>
  36.             </div>
  37.         </div>
  38.     {% endfor %}
  39. {% endif %}