From de507721891b8b47a4765eb053756c13cdb25d34 Mon Sep 17 00:00:00 2001 From: hono4kami Date: Sat, 21 Dec 2024 23:38:08 +0700 Subject: [PATCH 1/3] feat: add absolute timestamp `title` attribute Add absolute timestamp `title` attribute on post teaser Refs: #395 --- app/templates/post/post_teaser/_title.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/post/post_teaser/_title.html b/app/templates/post/post_teaser/_title.html index 41606ba4..4860b41d 100644 --- a/app/templates/post/post_teaser/_title.html +++ b/app/templates/post/post_teaser/_title.html @@ -26,4 +26,4 @@ {% if show_post_community -%} {% if post.community.icon_id and not low_bandwidth %}Community icon{% endif -%} c/{{ post.community.name }}{% endif -%} - by {{ render_username(post.author) }} \ No newline at end of file + by {{ render_username(post.author) }} From 5b37de577b07219aeacae586ebb50a0ee74fb22e Mon Sep 17 00:00:00 2001 From: hono4kami Date: Sat, 21 Dec 2024 23:44:43 +0700 Subject: [PATCH 2/3] feat: add absolute timestamp Add absolute timestamp to full post. Refs: #395 --- app/templates/post/_post_full.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/post/_post_full.html b/app/templates/post/_post_full.html index 9ae42048..1e6ed8b5 100644 --- a/app/templates/post/_post_full.html +++ b/app/templates/post/_post_full.html @@ -16,9 +16,9 @@ {% endif -%}

{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%} - {% endif -%}submitted {{ arrow.get(post.posted_at).humanize(locale=locale) }} by + {% endif -%}submitted by {{ render_username(post.author) }} - {% if post.edited_at -%} edited {{ arrow.get(post.edited_at).humanize(locale=locale) }}{% endif -%} + {% if post.edited_at -%} edited

{% if post.type == POST_TYPE_IMAGE -%}
From b2f57fa30898e7a31c5006f4fa9c47b7582b0b1f Mon Sep 17 00:00:00 2001 From: hono4kami Date: Sat, 21 Dec 2024 23:51:13 +0700 Subject: [PATCH 3/3] feat: add absolute timestamp for post reply Refs: #395 --- app/templates/post/_post_reply_teaser.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/post/_post_reply_teaser.html b/app/templates/post/_post_reply_teaser.html index 1f57ea73..155da4d1 100644 --- a/app/templates/post/_post_reply_teaser.html +++ b/app/templates/post/_post_reply_teaser.html @@ -34,7 +34,7 @@ {% endif -%}
- {{ 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 -%} + {% if post_reply.edited_at -%}, edited {% endif -%}
{% if post_reply.reports and current_user.is_authenticated and post_reply.post.community.is_moderator(current_user) -%}