diff options
Diffstat (limited to 'templates/category.html')
| -rw-r--r-- | templates/category.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/templates/category.html b/templates/category.html new file mode 100644 index 0000000..9d6b35d --- /dev/null +++ b/templates/category.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} + +{% 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 = "Category " + this.name %} +{% block content %} + {% set post_count = this.children.count() %} + <article> + <header> + <hgroup> + <h2>Category: {{ this.name }}</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> + </article> +{% endblock %} |
