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:
@@ -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>
|
||||
Reference in New Issue
Block a user