From 4cac6be5bbb56a817d2c39dc67cdfb7939c2d08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C4=ABna=20Lukjanovi=C4=8Da?= Date: Mon, 29 Apr 2024 09:05:40 +0000 Subject: [PATCH] Update templates/post.html --- templates/post.html | 54 ++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/templates/post.html b/templates/post.html index e260040..124f79d 100644 --- a/templates/post.html +++ b/templates/post.html @@ -2,35 +2,30 @@ {% block content %}
-

Create New Post

-
- {{ form.hidden_tag() }} -
- {{ form.category_id.label }}
- {{ form.category_id(class="form-control") }} -
-
- {{ form.post_name.label }}
- {{ form.post_name(class="form-control") }} -
-
- {{ form.created_by.label }}
- {{ form.created_by(class="form-control") }} -
-
- {{ form.text.label }}
- {{ form.text(class="form-control") }} -
-
- {{ form.media.label }}
- {{ form.media(class="form-control-file") }} -
- -
- +

{{ post.post_name }}

+

Created by {{ post.created_by }} - {{ post.creation_date.strftime('%Y-%m-%d %H:%M') }}


+
+

{{ post.text }}

+ {% for media in post.media %} +
+ Media +
+ {% endfor %} +
-

Comments

+
+
+ Upvote ({{ post.upvotes }}) + Downvote ({{ post.downvotes }}) +
+
+ {% if post.comments %} +

{{ post.comments.count() }} Comments

+ {% else %} +

0 Comments

+ {% endif %} +
{% if comments %}
    {% for comment in comments %} @@ -45,11 +40,10 @@ {% if g.user %}
    -
    - +
    - + {% else %}

    Log in to leave a comment.