aboutsummaryrefslogtreecommitdiffstats
path: root/Peli-Kiera/templates/author.html
blob: 2722740b5dd8928c8072a11ff361c3c9230c54c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{% extends "base.html" %}

{% block title %}{{ SITENAME }} - {{ author }}{% endblock %}

{% block content %}
    <main>
        <section id="list">
            <h2>Articles by - {{ author }}</h2>
            <ul>
                {% set new = namespace(p=0) %}
                {% for article in articles_page.object_list %}
                    {% set period = article.date | strftime('%Y') %}
                    {% if period != new.p %}
                        <h3>{{ period }}</h3>
                        <li>
                            <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
                            <time>{{ article.date|strftime('%b %Y') }}</time>
                        </li>
                        {% set new.p = article.date | strftime('%Y') %}
                    {% elif period == new.p %}
                        <li>
                            <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
                            <time>{{ article.date|strftime('%b %Y') }}</time>
                        </li>
                    {% endif %}
                {% endfor %}
            </ul>
        </section>
        {% if articles_page.has_other_pages() %}
            {% include 'pagination.html' %}
        {% endif %}
    </main>
{% endblock %}