diff options
Diffstat (limited to '')
| -rw-r--r-- | templates/tag.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/templates/tag.html b/templates/tag.html new file mode 100644 index 0000000..b433616 --- /dev/null +++ b/templates/tag.html @@ -0,0 +1,59 @@ +{% 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 = "Tag " + this.tag %} +{% block content %} + {% set post_count = this.items.count() %} + <article> + <header> + <hgroup> + <h2>Tag: {{ this.tag }}</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.items %} + <tr> + <td> + {% if post.publication_date %} + <time datetime="{{ post.publication_date }}">{{ post.publication_date }}</time> + {% endif %} + </td> + <td> + <a href="{{ post|url }}">{{ post.title }}</a> + </td> + </tr> + {% else %} + <tr> + <td colspan="2"> + <em>No posts for this tag.</em> + </td> + </tr> + {% endfor %} + </tbody> + </table> + </article> +{% endblock %} |
