feat: Implement public blog post listing and individual post viewing with new public handlers and templates, adding chrono for date formatting.

This commit is contained in:
2026-03-03 17:11:26 +00:00
parent ef068f7dfa
commit 57f2610164
10 changed files with 303 additions and 24 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>{{ title }}</title>
<title>blog</title>
<style>
* {
font-family: monospace !important;
@@ -12,8 +12,29 @@
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000EE" vlink="#551A8B" alink="#FF0000">
<h1>{{ title }}</h1>
<p>We are working hard to build something amazing.</p>
<h1>blog</h1>
<p>Welcome to my corner of the web.</p>
<hr size="1">
<h2>Public Posts</h2>
{% if posts.is_empty() %}
<p>No public posts available yet.</p>
{% else %}
{% for (post, author) in posts %}
<p>
<b><a href="/post/{{ post.id }}">{{ post.title }}</a></b><br>
<i>Posted by {{ author }} on {{ post.formatted_created_at() }}</i><br>
{% if !post.categories.is_empty() %}
Categories: {{ post.categories }}<br>
{% endif %}
{% if !post.tags.is_empty() %}
Tags: {{ post.tags }}<br>
{% endif %}
</p>
<br>
{% endfor %}
{% endif %}
</body>
</html>