feat: add absolute timestamp

Add absolute timestamp to full post.

Refs: #395
This commit is contained in:
hono4kami 2024-12-21 23:44:43 +07:00
parent de50772189
commit 5b37de577b

View file

@ -16,9 +16,9 @@
{% endif -%} {% endif -%}
<p>{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%} <p>{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%}
<span class="red fe fe-report" title="{{ _('Reported. Check post for issues.') }}"></span> <span class="red fe fe-report" title="{{ _('Reported. Check post for issues.') }}"></span>
{% endif -%}<small>submitted {{ arrow.get(post.posted_at).humanize(locale=locale) }} by {% endif -%}<small>submitted <time datetime="{{ arrow.get(post.posted_at) }}" title="{{ arrow.get(post.posted_at) }}">{{ arrow.get(post.posted_at).humanize(locale=locale) }}</time> by
{{ render_username(post.author) }} {{ render_username(post.author) }}
{% if post.edited_at -%} edited {{ arrow.get(post.edited_at).humanize(locale=locale) }}{% endif -%}</small> {% if post.edited_at -%} edited <time datetime="{{ arrow.get(post.posted_at) }}" title="{{ arrow.get(post.posted_at) }}">{{ arrow.get(post.edited_at).humanize(locale=locale) }}{% endif -%}</time></small>
</p> </p>
{% if post.type == POST_TYPE_IMAGE -%} {% if post.type == POST_TYPE_IMAGE -%}
<div class="post_image"> <div class="post_image">