UwU: display tags for post

main
Jae Lo Presti 7 months ago
parent 2d1bc846d6
commit 6939d40093
No known key found for this signature in database
GPG Key ID: 025F43E0BE5056C0

@ -11,4 +11,13 @@
{% else %}
<video controls="controls" src="/proxy/img/{{id}}" width="500px" loop></video>
{% endif %}
<br/>
<p>Tags:</p>
<ul>
{% for tag in post_tags_general %}
<li>{{tag}}</li>
{% endfor %}
</ul>
<br/>
<p><a href="{{baseurl}}/posts/{{id}}">View original on {{baseurl}}</a></p>
{% endblock %}

@ -106,17 +106,23 @@ def proxy_post_route(type, id):
return render_template("404.html")
if type != "posts":
if type == "posts":
post_data = hit_api_and_store(id, type)["post"]
post_content_ext = post_data["file"]["ext"]
post_tags_general = post_data["tags"]["general"]
kind = "image"
if post_content_ext in vid_exts:
kind = "video"
return render_template(
"post.html",
id=id,
description=post_data["description"],
kind=kind,
baseurl=site_baseurl,
post_tags_general=post_tags_general,
)
else:
return "Display not implemented yet", 501
post_data = hit_api_and_store(id, type)["post"]
post_content_ext = post_data["file"]["ext"]
kind = "image"
if post_content_ext in vid_exts:
kind = "video"
return render_template(
"post.html", id=id, description=post_data["description"], kind=kind
)

Loading…
Cancel
Save