diff options
Diffstat (limited to 'templates/blog-year-index.html')
| -rw-r--r-- | templates/blog-year-index.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/templates/blog-year-index.html b/templates/blog-year-index.html new file mode 100644 index 0000000..138cc86 --- /dev/null +++ b/templates/blog-year-index.html @@ -0,0 +1,54 @@ +{% extends "base.html" %} + +{% from "macros/pagination.html" import render_year_archive_navigation %} + +{% block meta %} + {{ super() }} + <meta property="og:type" content="website"> +{% endblock %} +{% block styles %} + {{ super() }} + <link rel="stylesheet" + type="text/css" + href="{{ '/static/css/category.css'|asseturl }}"> +{% endblock %} +{% set title = "Yearly archive: " + this.key %} +{% block content %} + {% set post_count = this.children.count() %} + <article> + <header> + <hgroup> + <h2>Yearly archive: {{ this.key }}</h2> + <p> + ({{ post_count }} + {% if post_count > 1 %} + posts) + {% else %} + post) + {% endif %} + </p> + </hgroup> + </header> + <table> + <thead class="visually-hidden"> + <tr> + <th scope="col">Date</th> + <th scope="col">Title</th> + </tr> + </thead> + <tbody> + {% for post in this.children.order_by('-publication_date') %} + <tr> + <td> + <time datetime="{{ post.publication_date }}">{{ post.publication_date }}</time> + </td> + <td> + <a href="{{ post|url }}">{{ post.title }}</a> + </td> + </tr> + {% endfor %} + </tbody> + </table> + {{ render_year_archive_navigation(this) }} + </article> +{% endblock %} |
