{% extends "main.html" %}

{% block content %}
  {% for article in numeros.0.articles %}
    <div class="aside">
      <hgroup>
        <p class="muted">{{ article.date.strftime('%d %B %Y') }}</p>
        <h3><a href="{{ base_url }}{{ article.url }}">{{ article.title_f }}</a></h3>
        <div>
          <p>{{ article.subtitle_f }}</p>
          {% if article.keywords %}
            <p class="muted">
              <small>
                {% for keyword in article.keywords %}
                  <a href="{{ base_url }}{{ keyword.url }}">#{{ keyword.name }}</a>{%- if not loop.last -%}, {% endif %}
                {% endfor %}
              </small>
            </p>
          {% endif %}
        </div>
      </hgroup>
      <div class="article-body">
        {% if article.abstract_fr %}
          <div class="article-abstract">{{ article.abstract_fr|markdown }}</div>
        {% else %}
          {% if article.abstract_en %}
            <div class="article-abstract" lang="en">{{ article.abstract_en|markdown }}</div>
          {% else %}
            <div class="article-abstract">{{ article.content_html|truncate(500) }}</div>
          {% endif %}
        {% endif %}
        <div class="article-nav">
          <a href="{{ base_url }}{{ article.url }}" role="button">Lire l’article →</a>
        </div>
      </div>
    </div>
  {% endfor %}
{% endblock content %}
