{% extends "base.html" %}
{% import "macros.html" as macros %}

{% block title %}{{ page.title }} · {{ config.title }}{% endblock title %}

{% block content %}
{% include "partials/back-to-section.html" %}
<article>
    <header class="entry-header">
        <h1 lang="akk-Latn">{{ page.title }}</h1>

        {% if page.description %}
            <p class="entry-description">{{ page.description }}</p>
        {% else %}
            <p class="entry-description">
                {% if page.taxonomies.natures %}
                    {% for nature in page.taxonomies.natures %}
                        {% if loop.first %}{{ nature | capitalize }}{% endif %}
                    {% endfor %}
                {% else %}
                    Mot
                {% endif %}
                {% if page.extra.gender %} {{ page.extra.gender }}{% endif %}{% if page.extra.meaning %} signifiant « {{ page.extra.meaning }} »{% endif %}.
            </p>
        {% endif %}

        {% include "partials/entry-dates.html" %}

        <dl class="metadata">
            <dt>Nature grammaticale</dt>
            <dd>{{ macros::taxonomy_links(terms=page.taxonomies.natures, kind="natures") }}</dd>

            {# Tera 1.x n’accepte pas les tableaux imbriqués dans un littéral set.
               Les champs restent donc explicites et leur balisage est factorisé par macro. #}
            {{ macros::metadata_field(extra=page.extra, key="meaning", label="Sens") }}
            {{ macros::metadata_list(extra=page.extra, key="logograms", label="Logogrammes", lang="sux-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="gender", label="Genre") }}
            {{ macros::metadata_field(extra=page.extra, key="pronoun_type", label="Type de pronom") }}
            {{ macros::metadata_field(extra=page.extra, key="person", label="Personne") }}
            {{ macros::metadata_field(extra=page.extra, key="number", label="Nombre") }}
            {{ macros::metadata_field(extra=page.extra, key="numeral_type", label="Type de numéral") }}
            {{ macros::metadata_field(extra=page.extra, key="value", label="Valeur") }}
            {{ macros::metadata_field(extra=page.extra, key="governs", label="Cas régi") }}
            {{ macros::metadata_field(extra=page.extra, key="function", label="Fonction") }}
            {{ macros::metadata_field(extra=page.extra, key="bound", label="Forme liée", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="plural", label="Pluriel", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="feminine", label="Féminin", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="masculine_plural", label="Pluriel masculin", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="feminine_plural", label="Pluriel féminin", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="predicative", label="Prédicatif (3 m. s.)", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="root", label="Racine", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="stem", label="Thème") }}
            {{ macros::metadata_field(extra=page.extra, key="verb_class", label="Classe verbale") }}
            {{ macros::metadata_field(extra=page.extra, key="vowel_class", label="Classe vocalique") }}
            {{ macros::metadata_field(extra=page.extra, key="preterite", label="Prétérit", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="durative", label="Duratif", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="perfect", label="Parfait", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="imperative", label="Impératif", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="participle", label="Participe", lang="akk-Latn") }}
            {{ macros::metadata_field(extra=page.extra, key="verbal_adjective", label="Adjectif verbal", lang="akk-Latn") }}
        </dl>
    </header>

    {{ page.content | safe }}
</article>
{% endblock content %}
