aboutsummaryrefslogtreecommitdiff
path: root/src/mixins/comment.pug
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixins/comment.pug')
-rw-r--r--src/mixins/comment.pug8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mixins/comment.pug b/src/mixins/comment.pug
index 3eca723..ffd4b5a 100644
--- a/src/mixins/comment.pug
+++ b/src/mixins/comment.pug
@@ -1,6 +1,7 @@
1include ../utils 1include ../utils
2 2
3mixin infoContainer(data, next_id, prev_id) 3mixin infoContainer(data, next_id, prev_id)
4 - var hats = (data.is_submitter?['op']:[]).concat(data.distinguished=="moderator"?['mod']:[])
4 div.comment-info-container 5 div.comment-info-container
5 p 6 p
6 | #{fmtnum(data.ups)} ↑ 7 | #{fmtnum(data.ups)} ↑
@@ -12,7 +13,7 @@ mixin infoContainer(data, next_id, prev_id)
12 a(href=`#${prev_id}` title="scroll to previous comment").nav-link prev 13 a(href=`#${prev_id}` title="scroll to previous comment").nav-link prev
13 |  ·  14 |  · 
14 span(class=`${data.is_submitter ? 'op' : ''}`) 15 span(class=`${data.is_submitter ? 'op' : ''}`)
15 | u/#{data.author} #{data.is_submitter ? '(op)' : ''} 16 | u/#{data.author} #{hats.length==0?'':`(${hats.join('|')})`}
16 |  ·  17 |  · 
17 if data.collapsed_reason_code == "DELETED" || data.author == "[deleted]" 18 if data.collapsed_reason_code == "DELETED" || data.author == "[deleted]"
18 a(href=`https://undelete.pullpush.io${data.permalink}`) search on undelete 19 a(href=`https://undelete.pullpush.io${data.permalink}`) search on undelete
@@ -22,6 +23,9 @@ mixin infoContainer(data, next_id, prev_id)
22 if data.edited !== false 23 if data.edited !== false
23 | edited #{timeDifference(Date.now(), data.edited * 1000)} ago 24 | edited #{timeDifference(Date.now(), data.edited * 1000)} ago
24 |  ·  25 |  · 
26 if data.stickied
27 | stickied
28 |  · 
25 a(href=`https://reddit.com${data.permalink}` title="view on reddit").nav-link open ↗ 29 a(href=`https://reddit.com${data.permalink}` title="view on reddit").nav-link open ↗
26 30
27- 31-
@@ -38,7 +42,7 @@ mixin comment(com, isfirst, parent_id, next_id, prev_id)
38 a(href=`/comments/${parent_id}/comment/${data.id}`) 42 a(href=`/comments/${parent_id}/comment/${data.id}`)
39 | #{data.count} more #{fmttxt(data.count, 'comment')} 43 | #{data.count} more #{fmttxt(data.count, 'comment')}
40 else 44 else
41 div(class=`comment ${isfirst ? 'first' : ''}`) 45 div(class=`comment ${isfirst ? 'first' : ''} ${data.stickied ? 'sticky' : ''}`)
42 details(id=`${data.id}` open="") 46 details(id=`${data.id}` open="")
43 summary.expand-comments 47 summary.expand-comments
44 +infoContainer(data, next_id, prev_id) 48 +infoContainer(data, next_id, prev_id)