diff options
Diffstat (limited to 'src/templates/blog/index.html')
| -rw-r--r-- | src/templates/blog/index.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/templates/blog/index.html b/src/templates/blog/index.html new file mode 100644 index 0000000..a0aee24 --- /dev/null +++ b/src/templates/blog/index.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} + +{% block head %} +{{ super() }} + +<link rel="stylesheet" href="/static/stylesheets/blog.css"> +{% endblock %} + +{% block content %} + +<h1>blog</h1> + +<div id="posts"> + {% for post in posts|sort(attribute="created_at", reverse=True) %} + <a class="container post" href="/blog/{{ post.id }}"> + <h2>{{ post.title }}</h2> + <p>{{ post.description or "" }}</p> + <p class="created-at">posted {{ format_ts(post.created_at) }}</p> + </a> + {% endfor %} + + {% if posts|length == 0 %} + <p>huh, I guess nothing has been posted yet.</p> + {% endif %} +</div> + +{% endblock %} |
