Write full types and fix related bugs

Also fixes #4.
This commit is contained in:
Cadence Fish
2020-01-27 03:56:59 +13:00
parent 482bdff3a4
commit 5303ae1d4b
16 changed files with 757 additions and 299 deletions

View File

@@ -5,16 +5,22 @@ html
head
meta(charset="utf-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
title= `${post.getIntroduction()} | Bibliogram`
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.proxyOwnerProfilePicture width=150 height=150 alt="").pfp
a.name(href=`/u/${post.extendedOwner.username}`)= `${post.extendedOwner.full_name} (@${post.extendedOwner.username})`
p.description= post.getCaption()
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.description= post.getCaption()
section.images-gallery
for image in post.getChildren()
img(src=image.proxyDisplayURL alt=image.getAlt() width=image.data.dimensions.width height=image.data.dimensions.height).sized-image
for image in post.children
img(src=image.getDisplayUrlP() alt=image.getAlt() width=image.data.dimensions.width height=image.data.dimensions.height).sized-image