summaryrefslogtreecommitdiffhomepage
path: root/apioforum/templates
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-06-10 00:20:09 +0000
committerubq323 <ubq323>2021-06-10 00:20:09 +0000
commit5eaab761b37f6e880ccc6e743675d7e2ad59c1e4 (patch)
tree53f71d4e2ec724090be0898668d68caebb812b70 /apioforum/templates
parentda82578b625dbe5c50d6ba228919cf7e0b585043 (diff)
delete post template, fuzziness for timestamps etc
Diffstat (limited to 'apioforum/templates')
-rw-r--r--apioforum/templates/common.html9
-rw-r--r--apioforum/templates/delete_post.html17
2 files changed, 25 insertions, 1 deletions
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html
index d4178d7..c5d1c26 100644
--- a/apioforum/templates/common.html
+++ b/apioforum/templates/common.html
@@ -2,7 +2,10 @@
<div class="post">
<div class="post-heading">
<span class="post-heading-a">
- <span class="post-heading-em">{{post.author}}</span> {{post.created}}
+ <span class="post-heading-em">{{post.author}}</span> {{ts(post.created)}}
+ {% if post.edited %}
+ (edited {{ts(post.updated)}})
+ {% endif %}
</span>
<span class="post-heading-b">
{% if buttons and post.author == g.user %}
@@ -23,3 +26,7 @@
</div>
</div>
{% endmacro %}
+
+{% macro ts(dt) -%}
+<time title="{{dt.isoformat(' ')}}" datetime="{{dt.isoformat(' ')}}">{{dt | fuzzy}}</time>
+{%- endmacro %}
diff --git a/apioforum/templates/delete_post.html b/apioforum/templates/delete_post.html
new file mode 100644
index 0000000..6f99704
--- /dev/null
+++ b/apioforum/templates/delete_post.html
@@ -0,0 +1,17 @@
+{% from 'common.html' import disp_post %}
+{% extends 'base.html' %}
+{% block header %}
+<h1>{% block title %}deleting post{% endblock %}</1h>
+{% endblock %}
+
+{% block content %}
+{% call disp_post(post, False) %}
+{{ rendered_content | safe }}
+{% endcall %}
+
+<form method="post">
+<p>confirm delete?</p>
+<input type="submit" value="delete">
+<a href="{{url_for('thread.view_thread',thread_id=post.thread)}}">cancel</a>
+</form>
+{% endblock %}