include ../mixins/comment include ../mixins/header doctype html html head meta(charset='UTF-8') meta(name="viewport" content="width=device-width, initial-scale=1.0") title reddit link(rel='stylesheet', href='/styles.css') script(src="https://cdn.dashjs.org/latest/dash.all.min.js") body main#content +header() div.hero h3 a(href=`/r/${post.subreddit}`) r/#{post.subreddit} h2 #{post.title} if post.is_gallery && post.is_gallery == true if post.gallery_data if post.gallery_data.items each item in post.gallery_data.items - var url = `https://i.redd.it/${item.media_id}.jpg` img(src=url).post-media if (post.post_hint == "image" || post.post_hint == "link") && post.thumbnail && post.thumbnail != "self" && post.thumbnail != "default" img(src=post.url).post-media else if post.post_hint == 'hosted:video' - var url = post.secure_media.reddit_video.dash_url video(controls data-dashjs-player src=`${url}`).post-media if post.selftext_html p.self-text !{post.selftext_html} div.info-container p | #{fmtnum(post.ups)} ↑ |  ·  by u/#{post.author} hr div.comments-container each child in comments +comment(child, true) script(src='https://unpkg.com/htmx.org@1.9.10')