{% if display == 'img' %}

  {% set image = page.media['00-home.jpg'] %}
  {% if image == null %}
    {% set image = page.media.images|first %}
  {% endif %}

  {% if page.taxonomy.tag %}
  {{ dump(catlist) }}
    <nav class="categories">
      <ul>
        {% for tag in page.taxonomy.tag %}
          <li>
            <a class="tag-{{ catlist[(tag|e('url'))] }}" href="/categories/tag{{ config.system.param_sep }}{{ tag|e('url') }}"><span>{{ tag }}</span></a>
          </li>
        {% endfor %}
      </ul>
    </nav>
  {% endif %}

  <a class="image-link" href="{{ page.url }}">{{ image.resize(500).html }}</a>

  <header>
    <h1>
      <a class="title" href="{{ page.url }}">{{page.title}}</a>
      <span class="date">{{page.date|date("Y")}}</span>
    </h1>
    <h2><a href="{{ page.url }}">{{page.header.subtitle}}</a></h2>
  </header>
{% endif %}

{% if display == 'text' %}
  <h4><a href="{{ page.url }}">{{page.title}} - {{page.date|date("Y")}}</a></h4>
  {% set image = page.media['00-cat.jpg'] %}
  {% if image == null %}
    {% set image = page.media.images|first %}
  {% endif %}
  <a class="projet-img" href="{{ page.url }}">{{ image.resize(500).html }}</a>
{% endif %}
