<!--
SPDX-FileCopyrightText: Copyright © 2024 André Anjos <andre.dos.anjos@gmail.com>
SPDX-License-Identifier: MIT
-->
{% extends "base.html" %}

{% block title %} &ndash; Publications{% endblock %}

{% block content %}
<article class="pybtex">
    {% block content_header %}
    <header>
        <h2>
            <a href="{{ SITEURL }}/publications" rel="bookmark" title="Permalink to Publications">Publications</a>
        </h2>
        {% import 'translations.html' as translations with context %}
        {{ translations.translations_for(publications) }}
    </header>
    {% endblock %}

    {% block before_content %}
    {% endblock %}

    {% block content_pybtex %}
    <div id="pybtex">
        {% for group in publications|groupby(attribute="year")|reverse %}
        <h3 id="{{ group.grouper }}">{{ group.grouper }}</h3>
            {% for item in group.list|sort(attribute="month")|reverse %}
            <details id="pybtex-{{ item.key }}">
                <summary>{{ item.html }}</summary>
                {{ item.bibtex }}
            </details>
            {% endfor %}
        {% endfor %}
    </div>
    {% endblock %}

    {% block content_footer %}
    <footer>
      <p>
        Last updated: {{ locale_date }}
      </p>
    </footer>
    {% endblock %}

</article>
{% endblock %}
