aboutsummaryrefslogtreecommitdiff
path: root/src/mixins
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixins')
-rw-r--r--src/mixins/comment.pug8
-rw-r--r--src/mixins/post.pug2
2 files changed, 7 insertions, 3 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)
diff --git a/src/mixins/post.pug b/src/mixins/post.pug
index 74a2b78..b44ae6d 100644
--- a/src/mixins/post.pug
+++ b/src/mixins/post.pug
@@ -2,7 +2,7 @@ include ../utils
2include postUtils 2include postUtils
3mixin post(p, currentUrl) 3mixin post(p, currentUrl)
4 - var from = encodeURIComponent(currentUrl) 4 - var from = encodeURIComponent(currentUrl)
5 article.post 5 article(class=`post ${p.stickied?"sticky":""}`)
6 div.post-container 6 div.post-container
7 div.post-text 7 div.post-text
8 div.title-container 8 div.title-container