aboutsummaryrefslogtreecommitdiff
path: root/src/mixins
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-12-19 15:19:28 +0000
committerAkshay <[email protected]>2024-12-19 15:19:28 +0000
commit79b7e7ebcfabc46cbaac0d13b769203b1d3a10e9 (patch)
tree2493b0d8c2d29f889d0d993e40c9bbd9ff5f167c /src/mixins
parent77ab37ccac0dc67829a4281730a5d95b9a07e512 (diff)
implement back button, restructure sort-opts
Diffstat (limited to 'src/mixins')
-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 | &nbsp;·&nbsp; 20 | &nbsp;·&nbsp;
20 a(href=`/r/${p.subreddit}`) r/#{p.subreddit} 21 a(href=`/r/${p.subreddit}`) r/#{p.subreddit}
21 | &nbsp;·&nbsp; 22 | &nbsp;·&nbsp;
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]