aboutsummaryrefslogtreecommitdiff
path: root/src/mixins
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixins')
-rw-r--r--src/mixins/post.pug24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mixins/post.pug b/src/mixins/post.pug
index 006193f..8a66d53 100644
--- a/src/mixins/post.pug
+++ b/src/mixins/post.pug
@@ -7,6 +7,16 @@ mixin post(p)
7 a(href=`/comments/${p.id}`) 7 a(href=`/comments/${p.id}`)
8 != p.title 8 != p.title
9 span.domain (#{p.domain}) 9 span.domain (#{p.domain})
10 div.info-container
11 p
12 | ↑ #{fmtnum(p.ups)}
13 |  · 
14 a(href=`/comments/${p.id}`) #{fmtnum (p.num_comments)} replies
15 |  · 
16 a(href=`/r/${p.subreddit}`) r/#{p.subreddit}
17 span.post-author
18 |  · 
19 by u/#{p.author}
10 div.media-preview 20 div.media-preview
11 if p.is_gallery && p.is_gallery == true 21 if p.is_gallery && p.is_gallery == true
12 if p.gallery_data 22 if p.gallery_data
@@ -20,17 +30,6 @@ mixin post(p)
20 else if p.post_hint == "hosted:video" 30 else if p.post_hint == "hosted:video"
21 - var url = p.secure_media.reddit_video.dash_url 31 - var url = p.secure_media.reddit_video.dash_url
22 video(src=url data-dashjs-player width='100px' height='100px' onclick=`toggleDetails('${p.id}')`) 32 video(src=url data-dashjs-player width='100px' height='100px' onclick=`toggleDetails('${p.id}')`)
23 div.info-container
24 p
25 | ↑ #{fmtnum(p.ups)}
26 |  · 
27 | 💬 
28 a(href=`/comments/${p.id}`) #{fmtnum (p.num_comments)}
29 |  · 
30 a(href=`/r/${p.subreddit}`) r/#{p.subreddit}
31 span.post-author
32 |  · 
33 by u/#{p.author}
34 33
35 if p.is_gallery && p.is_gallery == true 34 if p.is_gallery && p.is_gallery == true
36 if p.gallery_data 35 if p.gallery_data
@@ -52,7 +51,6 @@ mixin post(p)
52 details(id=`${p.id}`) 51 details(id=`${p.id}`)
53 summary expand video 52 summary expand video
54 - var url = p.secure_media.reddit_video.dash_url 53 - var url = p.secure_media.reddit_video.dash_url
55 a(href=url) 54 video(src=url controls data-dashjs-player).post-media
56 video(src=url controls data-dashjs-player).post-media
57 button(onclick=`toggleDetails('${p.id}')`) close 55 button(onclick=`toggleDetails('${p.id}')`) close
58 56