From ca35bec74a7622cd56f6e3b110f7739e4f13e071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fukan=20=C3=9Crker?= Date: Sat, 20 Jan 2024 23:04:39 +0300 Subject: [PATCH] added share on X button to posts --- helpers.py | 1 + routes/post.py | 2 ++ templates/tailwindUI/post.html | 23 +++++++++++++---------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/helpers.py b/helpers.py index 9014dbd8..624fe6ca 100644 --- a/helpers.py +++ b/helpers.py @@ -12,6 +12,7 @@ from requests import post as requestsPost from constants import ( LOG_IN, + APP_NAME, BREAKER_TEXT, REGISTRATION, LOG_FILE_ROOT, diff --git a/routes/post.py b/routes/post.py index fd15f672..afe462b0 100644 --- a/routes/post.py +++ b/routes/post.py @@ -5,6 +5,7 @@ request, message, url_for, + APP_NAME, redirect, addPoints, Blueprint, @@ -93,6 +94,7 @@ def post(postID): time=post[6], form=form, comments=comments, + appName=APP_NAME, ) case False: return render_template("404.html") diff --git a/templates/tailwindUI/post.html b/templates/tailwindUI/post.html index bf5b1c69..93921f41 100644 --- a/templates/tailwindUI/post.html +++ b/templates/tailwindUI/post.html @@ -7,15 +7,21 @@

{{content|safe}}
-

- {{tags.replace(",",", ")}}

-
-
-
+
+
+
+ {{tags.replace(",",", ")}}
+ +
+
+
{{views}}
+
{{time}}
+
+ -
-
{{time}}
-
{{date}}
+
{{date}}
{% if author == session["userName"] %}