{% if animationGroupes is not empty %}
{% for animationGroupe in animationGroupes %}
<h2>{{ animationGroupe.title }}</h2>
{{ animationGroupe.content | raw }}
<div class="grid-container-wrapper">
<div class="category-animation">
<div class="grid-x grid-margin-x align-center">
{% for animation in animationGroupe.animations %}
{% if animation.images is not empty %}
{% set image = vich_uploader_asset(animation.images | first, 'imageFile') | imagine_filter('detail_first_view') %}
{% else %}
{% set image = asset('images/sample/recipe.jpg') | imagine_filter('detail_first_view_local') %}
{% endif %}
<div class="cell smedium-6 medium-4">
<a {% if animation.type == 'static' %} href="{{ animation.allslug }}" {% else %} href="{{ path(animation.type ~ '_view', {'slug': animation.slug, 'id': animation.id}) }}" {% endif %}>
<div class="animation-item" data-equalizer-watch>
<div class="animation-item__picture">
<img itemprop="image" src="{{ asset('images/sample/img'~ loop.index ~'.png') }}" alt="{{ animation.name }}"/>
</div>
{#FIXME: ajouter une image
<div class="animation-item__picture">
<img itemprop="image" src="{{ image }}" alt="{{ animation.name }}" />
</div>
#}
<div class="animation-item__title">
<h3>{{ animation.name }}</h3>
<p>
{{ animation.content }}
</p>
</div>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</div>
{% endfor %}
{% endif %}