include ../mixins/comment include ../mixins/header include ../mixins/head include ../mixins/postUtils include ../utils - var post = data.post - var comments = data.comments doctype html html +head(post.title) script. function toggleDetails(details_id) { var detailsElement = document.getElementById(details_id); if (detailsElement) { detailsElement.open = !detailsElement.open; } } body main#content +header(user) div.hero h3.sub-title a(href=`/r/${post.subreddit}`) ← r/#{post.subreddit} div.info-container p | #{fmtnum(post.ups)} ↑ |  ·  by u/#{post.author} |  ·  | #{timeDifference(Date.now(), post.created * 1000)} h2.post-title != post.title if isPostGallery(post) div.gallery each item in postGalleryItems(post) div.gallery-item div.gallery-item-idx | #{`${item.idx}/${item.total}`} a(href=`/media/${item.url}`) img(src=item.url loading="lazy") else if isPostImage(post) img(src=post.url).post-media else if isPostVideo(post) - var url = post.secure_media.reddit_video.dash_url video(controls data-dashjs-player src=`${url}`).post-media else if isPostLink(post) a(href=post.url) | #{post.url} if post.selftext_html div.self-text != post.selftext_html hr div.comments-container each child in comments +comment(child, true, post.id)