diff options
Diffstat (limited to 'Peli-Kiera/templates/author.html')
-rw-r--r-- | Peli-Kiera/templates/author.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Peli-Kiera/templates/author.html b/Peli-Kiera/templates/author.html new file mode 100644 index 0000000..2722740 --- /dev/null +++ b/Peli-Kiera/templates/author.html @@ -0,0 +1,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 %} |