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

<div class="card" data-filter="{{tag}}">
  <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">
      <a href="{{ page.url }}">{{ image.html('','evenement') }}</a>
    </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">
      <a href="{{ page.url }}">
      {% if page.summary != page.content %}
        {{ page.summary(100)|raw }}
      {% endif %}
      </a>
    </div>
  </div>
</div>

{% endfor %}
