From f8bef76385f8af54b2f3de24879c1fe04d277c11 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 19 Dec 2024 16:12:08 +0000 Subject: add `edited` indicator to comments --- src/mixins/comment.pug | 3 +++ src/mixins/post.pug | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mixins') diff --git a/src/mixins/comment.pug b/src/mixins/comment.pug index f46f293..3eca723 100644 --- a/src/mixins/comment.pug +++ b/src/mixins/comment.pug @@ -19,6 +19,9 @@ mixin infoContainer(data, next_id, prev_id) |  ·  | #{timeDifference(Date.now(), data.created * 1000)} |  ·  + if data.edited !== false + | edited #{timeDifference(Date.now(), data.edited * 1000)} ago + |  ·  a(href=`https://reddit.com${data.permalink}` title="view on reddit").nav-link open ↗ - diff --git a/src/mixins/post.pug b/src/mixins/post.pug index b182e0d..74a2b78 100644 --- a/src/mixins/post.pug +++ b/src/mixins/post.pug @@ -3,7 +3,7 @@ include postUtils mixin post(p, currentUrl) - var from = encodeURIComponent(currentUrl) article.post - div(id=`${p.id}`).post-container + div.post-container div.post-text div.title-container a(href=`/comments/${p.id}?from=${from}`) -- cgit v1.2.3