aboutsummaryrefslogtreecommitdiff
path: root/src/mixins/post.pug
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixins/post.pug')
-rw-r--r--src/mixins/post.pug9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mixins/post.pug b/src/mixins/post.pug
index 027e42f..b182e0d 100644
--- a/src/mixins/post.pug
+++ b/src/mixins/post.pug
@@ -1,11 +1,12 @@
1include ../utils 1include ../utils
2include postUtils 2include postUtils
3mixin post(p) 3mixin post(p, currentUrl)
4 - var from = encodeURIComponent(currentUrl)
4 article.post 5 article.post
5 div.post-container 6 div(id=`${p.id}`).post-container
6 div.post-text 7 div.post-text
7 div.title-container 8 div.title-container
8 a(href=`/comments/${p.id}`) 9 a(href=`/comments/${p.id}?from=${from}`)
9 != p.title 10 != p.title
10 span.domain (#{p.domain}) 11 span.domain (#{p.domain})
11 div.info-container 12 div.info-container
@@ -19,7 +20,7 @@ mixin post(p)
19 |  ·  20 |  · 
20 a(href=`/r/${p.subreddit}`) r/#{p.subreddit} 21 a(href=`/r/${p.subreddit}`) r/#{p.subreddit}
21 |  ·  22 |  · 
22 a(href=`/comments/${p.id}`) #{fmtnum (p.num_comments)} ↩ 23 a(href=`/comments/${p.id}?from=${from}`) #{fmtnum (p.num_comments)} ↩
23 div.media-preview 24 div.media-preview
24 if isPostGallery(p) 25 if isPostGallery(p)
25 - var item = postGalleryItems(p)[0] 26 - var item = postGalleryItems(p)[0]