Commit a3fc627734
a3fc6277345ab1890992dfb1ba05cc513a38a2f6
parent: cd0f20fa2d
Verified · cmc
cmc <hello@cleberg.net> · 2026-03-11 05:06 UTC
Update blog, post, and page templates
Layout: unified · split
theme/templates/blog.html
+11 −17
| @@ -1,19 +1,13 @@ |
| 1 | {% extends "base.html" %} {% block subtitle %}blog - {% endblock %} {% block |
1 | {% extends "base.html" %} {% block subtitle %}blog - {% endblock %} {% block main %} |
| 2 | main %} |
| |
| 3 | <h1>Blog</h1> |
2 | <h1>Blog</h1> |
| 4 | <p> |
3 | <p class="blog-meta">Use <code>⌘ F</code> / <code>Ctrl F</code> to search · <a href="/feed.xml">RSS Feed</a></p> |
| 5 | Use <code>⌘ + f</code> (<code>Ctrl + f</code>) to search for |
4 | <p class="label">All Posts</p> |
| 6 | keywords. |
5 | <ul class="post-list"> |
| 7 | </p> |
| |
| 8 | <p> |
| |
| 9 | You can also add the <a href="/feed.xml">RSS Feed</a> to your feed reader. |
| |
| 10 | </p> |
| |
| 11 | <br> |
| |
| 12 | {% for post in posts %} |
6 | {% for post in posts %} |
| 13 | <div class="post"> |
7 | <li class="post-list-item"> |
| 14 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}' |
8 | <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a> |
| 15 | >{{ post.date|strftime("%Y-%m-%d") }}</time |
9 | <time datetime='{{ post.date | strftime("%Y-%m-%d") }}'>{{ post.date|strftime("%Y-%m-%d") }}</time> |
| 16 | > |
10 | </li> |
| 17 | <a href='{{ url_for("blog", slug=post.slug) }}' data-text="{{ post.title }}">{{ post.title }}</a> |
11 | {% endfor %} |
| 18 | </div> |
12 | </ul> |
| 19 | {% endfor %} {% endblock %} |
13 | {% endblock %} |
theme/templates/page.html
+3 −6
| @@ -1,11 +1,8 @@ |
| 1 | {% extends "base.html" %} |
1 | {% extends "base.html" %} |
| 2 | |
2 | {% block subtitle %}{{ post.title }} - {% endblock %} |
| 3 | {% block subtitle %} |
| |
| 4 | {{ post.title }} - |
| |
| 5 | {% endblock %} |
| |
| 6 | {% block main %} |
3 | {% block main %} |
| 7 | <article> |
4 | <article> |
| 8 | <h1 data-text="{{ post.title }}">{{ post.title }}</h1> |
5 | <h1>{{ post.title }}</h1> |
| 9 | <section>{{ post.html | safe }}</section> |
6 | <div class="page-body">{{ post.html | safe }}</div> |
| 10 | </article> |
7 | </article> |
| 11 | {% endblock %} |
8 | {% endblock %} |
theme/templates/post.html
+10 −8
| @@ -6,14 +6,16 @@ |
| 6 | <meta property="og:description" content="{{ post.description }}" /> |
6 | <meta property="og:description" content="{{ post.description }}" /> |
| 7 | {% elif project_description is defined %} |
7 | {% elif project_description is defined %} |
| 8 | <meta property="og:description" content="{{ project_description }}" /> |
8 | <meta property="og:description" content="{{ project_description }}" /> |
| 9 | {% endif %} {% endblock %} {% block main %} |
9 | {% endif %} |
| |
10 | {% endblock %} |
| |
11 | {% block main %} |
| 10 | <article> |
12 | <article> |
| 11 | <section class="metadata"> |
13 | <p class="article-dateline"><time datetime='{{ post.date|strftime("%Y-%m-%d") }}'>{{ post.date|strftime("%Y-%m-%d") }}</time></p> |
| 12 | <b>Object</b> <span>{{ post.title }}</span> |
14 | <h1 class="article-title">{{ post.title }}</h1> |
| 13 | <b>Timestamp</b> <span><time datetime='{{ post.date|strftime("%Y-%m-%d") }}'>{{ post.date|strftime("%Y-%m-%d %H:%M:%S") }}</time></span> |
15 | {% if post.description is defined %} |
| 14 | <b>Summary</b> <span>{{ post.description }}</span> |
16 | <p class="article-standfirst">{{ post.description }}</p> |
| 15 | </section> |
17 | {% endif %} |
| 16 | <section>{{ post.html | safe }}</section> |
18 | <div class="article-body">{{ post.html | safe }}</div> |
| 17 | <div class="reply-link"><a href="mailto:hello@cleberg.net">Reply via email →</a></div> |
19 | <div class="reply-link"><a href="mailto:hello@cleberg.net">Reply via email →</a></div> |
| 18 | </article> |
20 | </article> |
| 19 | {% endblock %} |
21 | {% endblock %} |