summary refs log tree commit diff
path: root/templates/post.html
blob: d759da49b086d944262b9f131c5f9d23ef19d404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{% extends 'base.html' %}

{% block content %}
{% 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>
</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 %}