diff options
Diffstat (limited to 'src/mixins/comment.pug')
-rw-r--r-- | src/mixins/comment.pug | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mixins/comment.pug b/src/mixins/comment.pug index 99231d8..f6d7b5e 100644 --- a/src/mixins/comment.pug +++ b/src/mixins/comment.pug | |||
@@ -17,13 +17,14 @@ mixin infoContainer(data) | |||
17 | return data.replies && data.replies.data && data.replies.data.children && data.replies.data.children.length > 0; | 17 | return data.replies && data.replies.data && data.replies.data.children && data.replies.data.children.length > 0; |
18 | } | 18 | } |
19 | 19 | ||
20 | mixin comment(com, isfirst) | 20 | mixin comment(com, isfirst, parent_id) |
21 | - var data = com.data | 21 | - var data = com.data |
22 | - var hasReplyData = hasReplies(data) | 22 | - var hasReplyData = hasReplies(data) |
23 | 23 | ||
24 | if com.kind == "more" | 24 | if com.kind == "more" |
25 | div(class=`more ${isfirst ? 'first' : ''}`) | 25 | div(class=`more ${isfirst ? 'first' : ''}`) |
26 | | #{data.count} more #{fmttxt(data.count, 'comment')} | 26 | a(href=`/comments/${parent_id}/comment/${data.id}`) |
27 | | #{data.count} more #{fmttxt(data.count, 'comment')} | ||
27 | else | 28 | else |
28 | div(class=`comment ${isfirst ? 'first' : ''}`) | 29 | div(class=`comment ${isfirst ? 'first' : ''}`) |
29 | details(id=`${data.id}` open="") | 30 | details(id=`${data.id}` open="") |
@@ -34,4 +35,4 @@ mixin comment(com, isfirst) | |||
34 | if hasReplyData | 35 | if hasReplyData |
35 | div.replies | 36 | div.replies |
36 | each reply in data.replies.data.children | 37 | each reply in data.replies.data.children |
37 | +comment(reply, false) | 38 | +comment(reply, false, parent_id) |