+2
-2
flake.nix
+2
-2
flake.nix
+16
-13
src/mixins/comment.pug
+16
-13
src/mixins/comment.pug
···
2
2
3
3
mixin infoContainer(data, next_id, prev_id)
4
4
div.comment-info-container
5
-
| #{fmtnum(data.ups)} ↑
6
-
| ·
7
-
if next_id
8
-
a(href=`#${next_id}`).nav-link next
5
+
p
6
+
| #{fmtnum(data.ups)} ↑
7
+
| ·
8
+
if next_id
9
+
a(href=`#${next_id}` title="scroll to next comment").nav-link next
10
+
| ·
11
+
if prev_id
12
+
a(href=`#${prev_id}` title="scroll to previous comment").nav-link prev
13
+
| ·
14
+
span(class=`${data.is_submitter ? 'op' : ''}`)
15
+
| u/#{data.author} #{data.is_submitter ? '(op)' : ''}
9
16
| ·
10
-
if prev_id
11
-
a(href=`#${prev_id}`).nav-link prev
12
-
| ·
13
-
span(class=`${data.is_submitter ? 'op' : ''}`)
14
-
| u/#{data.author} #{data.is_submitter ? '(op)' : ''}
15
-
| ·
16
-
if data.collapsed_reason_code == "DELETED"
17
-
a(href=`https://undelete.pullpush.io${data.permalink}`) search on undelete
17
+
if data.collapsed_reason_code == "DELETED"
18
+
a(href=`https://undelete.pullpush.io${data.permalink}`) search on undelete
19
+
| ·
20
+
| #{timeDifference(Date.now(), data.created * 1000)}
18
21
| ·
19
-
| #{timeDifference(Date.now(), data.created * 1000)}
22
+
a(href=`https://reddit.com${data.permalink}` title="view on reddit").nav-link open ↗
20
23
21
24
-
22
25
function hasReplies(data) {
+4
src/public/styles.css
+4
src/public/styles.css
+6
src/views/comments.pug
+6
src/views/comments.pug
···
25
25
a(href=`/r/${post.subreddit}`) ← r/#{post.subreddit}
26
26
27
27
div.info-container
28
+
- var domain = (new URL(post.url)).hostname
28
29
p
29
30
| #{fmtnum(post.ups)} ↑
30
31
| · by u/#{post.author}
31
32
| ·
32
33
| #{timeDifference(Date.now(), post.created * 1000)}
34
+
| ·
35
+
if domain !== 'www.reddit.com'
36
+
a(href=`${post.url}`) submission url ↗
37
+
| ·
38
+
a(href=`https://reddit.com${post.permalink}`) reddit ↗
33
39
34
40
h2.post-title
35
41
!= post.title