Merge pull request 'Show the full timestamp when hovering over a relative timestamp of a post and post reply' (#399) from hono4kami/pyfedi:hono4kami/395-add-post-and-post-reply-absolute-timestamp into main

Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/399
This commit is contained in:
rimu 2024-12-22 01:31:32 +00:00
commit 53dc359712
3 changed files with 4 additions and 4 deletions

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">

View file

@ -34,7 +34,7 @@
{% endif -%} {% endif -%}
</div> </div>
<div class="col-auto text-muted small pt-05"> <div class="col-auto text-muted small pt-05">
{{ arrow.get(post_reply.posted_at).humanize(locale=locale) }}{% if post_reply.edited_at -%}, edited {{ arrow.get(post_reply.edited_at).humanize(locale=locale) }}{% endif -%} <time datetime="{{ arrow.get(post_reply.posted_at) }}" title="{{ arrow.get(post_reply.posted_at) }}">{{ arrow.get(post_reply.posted_at).humanize(locale=locale) }}</time>{% if post_reply.edited_at -%}, edited <time datetime="{{ arrow.get(post_reply.posted_at) }}" title="{{ arrow.get(post_reply.posted_at) }}">{{ arrow.get(post_reply.edited_at).humanize(locale=locale) }}</time>{% endif -%}
</div> </div>
<div class="col-auto"> <div class="col-auto">
{% if post_reply.reports and current_user.is_authenticated and post_reply.post.community.is_moderator(current_user) -%} {% if post_reply.reports and current_user.is_authenticated and post_reply.post.community.is_moderator(current_user) -%}

View file

@ -26,4 +26,4 @@
<span class="author small">{% if show_post_community -%}<a href="/c/{{ post.community.link() }}" aria-label="{{ _('Go to community %(name)s', name=post.community.name) }}"> <span class="author small">{% if show_post_community -%}<a href="/c/{{ post.community.link() }}" aria-label="{{ _('Go to community %(name)s', name=post.community.name) }}">
{% if post.community.icon_id and not low_bandwidth %}<img class="community_icon_small rounded-circle" src="{{ post.community.icon_image('tiny') }}" alt="Community icon" />{% endif -%} {% if post.community.icon_id and not low_bandwidth %}<img class="community_icon_small rounded-circle" src="{{ post.community.icon_image('tiny') }}" alt="Community icon" />{% endif -%}
c/{{ post.community.name }}</a>{% endif -%} c/{{ post.community.name }}</a>{% endif -%}
by {{ render_username(post.author) }} <time datetime="{{ post.last_active }}">{{ post.posted_at_localized(sort, locale) }}</time></span> by {{ render_username(post.author) }} <time datetime="{{ post.last_active }}" title="{{ post.last_active }}">{{ post.posted_at_localized(sort, locale) }}</time></span>