diff options
author | Akshay <[email protected]> | 2024-12-19 16:12:08 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2024-12-19 16:14:49 +0000 |
commit | f8bef76385f8af54b2f3de24879c1fe04d277c11 (patch) | |
tree | 8764a7d77bcdc541c2b26c03c8e8eb3663ee0ab5 /src/mixins | |
parent | 79b7e7ebcfabc46cbaac0d13b769203b1d3a10e9 (diff) |
add `edited` indicator to comments
Diffstat (limited to 'src/mixins')
-rw-r--r-- | src/mixins/comment.pug | 3 | ||||
-rw-r--r-- | src/mixins/post.pug | 2 |
2 files changed, 4 insertions, 1 deletions
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) | |||
19 | | · | 19 | | · |
20 | | #{timeDifference(Date.now(), data.created * 1000)} | 20 | | #{timeDifference(Date.now(), data.created * 1000)} |
21 | | · | 21 | | · |
22 | if data.edited !== false | ||
23 | | edited #{timeDifference(Date.now(), data.edited * 1000)} ago | ||
24 | | · | ||
22 | a(href=`https://reddit.com${data.permalink}` title="view on reddit").nav-link open ↗ | 25 | a(href=`https://reddit.com${data.permalink}` title="view on reddit").nav-link open ↗ |
23 | 26 | ||
24 | - | 27 | - |
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 | |||
3 | mixin post(p, currentUrl) | 3 | mixin post(p, currentUrl) |
4 | - var from = encodeURIComponent(currentUrl) | 4 | - var from = encodeURIComponent(currentUrl) |
5 | article.post | 5 | article.post |
6 | div(id=`${p.id}`).post-container | 6 | div.post-container |
7 | div.post-text | 7 | div.post-text |
8 | div.title-container | 8 | div.title-container |
9 | a(href=`/comments/${p.id}?from=${from}`) | 9 | a(href=`/comments/${p.id}?from=${from}`) |