blob: 960ad5301bacdab11855b106cbec990ca97e22d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
include utils
mixin post(p)
article.post
div.post-container
div.post-text
div.title-container
!= p.title
span.domain (#{p.domain})
div.info-container
div.info-item ↑ #{fmtnum(p.ups)}
div.info-item by u/#{p.author}
div.info-item
a(href=`/r/${p.subreddit}`) r/#{p.subreddit}
div.info-item
a(href=`/comments/${p.id}`) #{fmtnum (p.num_comments)} #{fmttxt(p.num_comments, 'comment')}
div.media-preview
if p.post_hint == "image" || p.post_hint == "link"
if p.thumbnail && p.thumbnail != "self" || p.thumbnail != "default"
a(href=p.url)
img(src=p.thumbnail width='100px')
else if p.post_hint == "hosted:video"
- var url = p.secure_media.reddit_video.fallback_url
a(href=url)
video(src=url height='100px')
|