diff options
| author | Dennis Fink | 2026-06-18 17:57:51 +0200 |
|---|---|---|
| committer | Dennis Fink | 2026-06-18 17:57:51 +0200 |
| commit | a4e35942fee745e64db5d0099ba2582e0fb4417e (patch) | |
| tree | f109c3e77805cdacd6f443c8a2d47514be5254a2 /templates/tag.html | |
| parent | e0904e48a5c1c5b327c29218fb39bf2fa05f1871 (diff) | |
| download | dennisfink.me-a4e35942fee745e64db5d0099ba2582e0fb4417e.tar.gz dennisfink.me-a4e35942fee745e64db5d0099ba2582e0fb4417e.zip | |
Build the first usable version of the blog
This adds the Lektor project structure, models, templates, styling,
feeds, categories, tags, archives, custom Markdown heading handling, and
the initial content needed to make the blog usable.
Diffstat (limited to 'templates/tag.html')
| -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 %} |
