{% extends "base.html" %}

{% block content %}
<h1>{{ section.title }}</h1>

<p>{{ section.description }}</p>

<small>
  <a class="link-page" href="{{ config.base_url }}/tags">Filter by tag</a>
  <br />
  From newest to oldest ↓
</small>

{% for page in section.pages %}
<article>
  <h2>
    <a class="link-page" href="{{ page.permalink | safe }}">{{ page.title }}</a>
  </h2>
  {%- if page.description %}
    <p>{{ page.description }}</p>
  {%- endif %}
  {%- if page.date %}
    <small>
      <time datetime="{{ page.date | date(format='%+') }}" pubdate>
        {{- page.date | date(format=config.extra.date_format) -}}
      </time>
      {%- if page.taxonomies %}
        {%- for name, taxon in page.taxonomies %}
        •
          {%-for item in taxon %}
          <a href="{{ get_taxonomy_url(kind=name, name=item) }}">
            <i class="bi bi-tag-fill"></i>
            {{ item }}
          </a>&nbsp;
          {%- endfor %}
        {%- endfor %}
      {%- endif %}
    </small>
  {%- endif %}
</article>
{% endfor %}
{% endblock content %}
