1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-09-20 20:47:30 +00:00
bibliogram/src/site/pug/post.pug
Cadence Fish 0ea95d1943
Clickable usernames and hashtags
Should work well enough. Report edge cases.
2020-02-04 03:30:19 +13:00

33 lines
1.2 KiB
Plaintext

include includes/display_structured
- const numberFormat = new Intl.NumberFormat().format
doctype html
html
head
meta(charset="utf-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
title
if post.getCaptionIntroduction()
=post.getCaptionIntroduction()
else
=`Post from @${post.getBasicOwner().username}`
=` | Bibliogram`
link(rel="stylesheet" type="text/css" href="/static/css/main.css")
script(src="/static/js/pagination.js" type="module")
body.post-page
main.post-page-divider
section.description-section
header.user-header
img(src=post.ownerPfpCacheP width=150 height=150 alt="").pfp
a.name(href=`/u/${post.getBasicOwner().username}`)= `${post.data.owner.full_name} (@${post.getBasicOwner().username})`
if post.getCaption()
p.structured-text.description
+display_structured(post.getStructuredCaption())
section.images-gallery
for entry in post.children
if entry.isVideo()
video(src=entry.getVideoUrlP() controls preload="auto" width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-video
else
img(src=entry.getDisplayUrlP() alt=entry.getAlt() width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-image