{% extends "base.html" %} {% block content %}
<header class="{{ category }}">
  <figure>
    {% if category in CATEGORIES_DESCRIPTION.keys() %}
    {% set cat = CATEGORIES_DESCRIPTION[category] %}
    <h1 class="post-title">{{ cat[0] }}</h1>
    <figcaption>
      <a id="feed" href="{{ SITEURL }}/feeds/{{ category.slug }}.atom.xml">
        {% if cat[3] == "fr" %}Flux RSS{% else %}Feed{% endif %}
        <img src="{{ SITEURL }}/theme/rss.svg" />
      </a>
    </figcaption>
    <p>{{ cat[2] }} {{ cat[1] }}</p>
    {% else %}
    <h1>{{ category }}</h1>
    {% endif %}
  </figure>
</header>
<article class="{{ category }}">
  {% for year, year_articles in articles | groupby('date.year') | reverse %}
  <h2>{{ year }}</h2>
  <ul>
    {% for article in year_articles %}
    <li>
      <a href="{{ SITEURL }}/{{ article.url }}" id="page-title"
        >{{ article.title | replace('Notes hebdo', '')}}</a
      >
      {% if article.category == "Lectures" %}de {{article.author}}{% endif %} {%
      for tag in article.tags %}
      <div class="tag">{{ tag }}</div>
      {% endfor %}
    </li>
    {% endfor %}
  </ul>
  {% endfor %}
</article>
{% endblock %}
