{% extends "base.html" %}
{% block content %}
  <header>
    <figure>
      <h1 class="post-title"><del>not</del> my ideas</h1>
      <figcaption>Carnets web d'Alexis M</figcaption>
    </figure>
  </header>
  <article>
    <p>👋 Hey, I'm <a href="/about">Alexis</a>. Here you can find:</p>
    <ul>
      <li>
        <a class="link-code" href="/code">Bits of code</a> (en), tips and learnings around software.
      </li>
      <li>
        <a class="link-ecriture" href="/ecriture">Des écrits</a> (fr), poésie et fiction, souvent au format
        court.
      </li>
      <li>
        <a class="link-lectures" href="/lectures">Des notes de lecture</a> (fr), sur differents bouquins.
      </li>
      <li>
        <a class="link-weeknotes" href="/weeknotes">Mes notes hebdo</a> (fr).
      </li>
    </ul>
  </article>
  {% if articles %}
    <hr />
    <div id="articles">
      <h2>Les derniers articles / Last articles</h2>
      <ul class="items">
        {% set articles_in_categories = articles | rejectattr('category', 'in', HOMEPAGE_EXCLUDED_CATEGORIES) | list %}
        {% set limited_articles = articles_in_categories[:20] %}
        {% for article in limited_articles %}
          <li class="item link-{{ article.category }}">
            {% set category_description = CATEGORIES_DESCRIPTION.get(article.category)[0] %}
            <a href="{{ SITEURL }}/{{ article.url }}" class="page-title">{{ category_icon }} {{ category_description }}: {{ article.title.replace(category_description, "") }}</a>
            <time datetime="{{ article.date.isoformat() }}">{{ article.date.strftime("%Y-%m-%d") }}</time>
          </li>
        {% endfor %}
      </ul>
      <a href="archives.html">Archives</a>
    </div>
  {% endif %}
{% endblock content %}
