diff options
Diffstat (limited to 'templates/post.html')
-rw-r--r-- | templates/post.html | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/templates/post.html b/templates/post.html index 8272d37..d759da4 100644 --- a/templates/post.html +++ b/templates/post.html @@ -1,8 +1,24 @@ {% extends 'base.html' %} {% block content %} - <h2>{{ post.title }}</h2> - <p>{{ post.created_at.strftime('%Y-%m-%d %H:%M') }}</p> - <div>{{ post.content|markdown|safe }}</div> +{% if post.parent != 0 %} +<a href="{{url_for('post', post_id=post.parent)}}"> Previous</a> +<hr> +{% endif %} +<h2>{{ post.title }}</h2> +<p>{{ post.created_at.strftime('%Y-%m-%d %H:%M') }}</p> +<p> Authour: {{post.authour.name}}</p> +<div>{{ post.content|markdown|safe }}</div> +<div class="post-actions"> + <a href="{{ url_for('create', reply=post.id)}}"> Reply</a> ~ <a href="{{ url_for('index') }}">Back to posts</a> -{% endblock %} +</div> +<hr> +<h3> Replies to this</h3> +<div class="post-replies"> + <ul> + <li> {% for reply in replies %} <a href="{{ url_for('post', post_id=reply.id) }}">{{ reply.title }}</a> - {{ + reply.created_at.strftime('%Y-%m-%d') }}</li> {% endfor %} + </ul> +</div> +{% endblock %} \ No newline at end of file |