Add SPA post overlay
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
include includes/display_structured
|
||||
|
||||
- const numberFormat = new Intl.NumberFormat().format
|
||||
include includes/post
|
||||
|
||||
doctype html
|
||||
html
|
||||
@@ -12,18 +10,7 @@ html
|
||||
=`Post from @${post.getBasicOwner().username}`
|
||||
=` | Bibliogram`
|
||||
include includes/head
|
||||
script(type="module" src="/static/js/post_overlay.js")
|
||||
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
|
||||
main
|
||||
+post(post)
|
||||
|
||||
Reference in New Issue
Block a user