{% for tag in page.taxonomy.tag %}
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
{% import _self as macro %}

<div class="card" data-filter="{{tag}}">
  <a href="{{ page.url }}">
  <div class="card-header {{ macro.pageLinkName(tag) }}">
    {% include 'partials/blog/public.html.twig' %}
  </div>
  {% set image = page.media.images|first %}
  {% if image %}
    <div class="card-image">
      {{ image.html('','evenement') }}
    </div>
  {% endif %}
  <div class="card-body">
    <div class="card-title">
      {% include 'partials/blog/date.html.twig' %}
      {% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
    </div>
    <div class="card-summary">
      {% if page.summary != page.content %}
        {{ page.summary(100)|raw }}
      {% endif %}

    </div>
  </div>
</a>
</div>

{% endfor %}
