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/blog-month-index.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 '')
| -rw-r--r-- | templates/blog-month-index.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/templates/blog-month-index.html b/templates/blog-month-index.html new file mode 100644 index 0000000..d114628 --- /dev/null +++ b/templates/blog-month-index.html @@ -0,0 +1,54 @@ +{% extends "base.html" %} + +{% from "macros/pagination.html" import render_month_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 = "Monthly archive: " + this.date | dateformat('MMMM y') %} +{% block content %} + {% set post_count = this.children.count() %} + <article> + <header> + <hgroup> + <h2>Monthly archive: {{ this.date | dateformat("MMMM y") }}</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_month_archive_navigation(this) }} + </article> +{% endblock %} |
