2020-02-21 12:35:19 +00:00
|
|
|
include ./display_structured
|
|
|
|
|
2020-02-26 07:12:48 +00:00
|
|
|
mixin post(post, headerWithNavigation)
|
2020-05-19 15:03:21 +00:00
|
|
|
.post-page-divider(class={
|
|
|
|
"caption-on-right": settings.caption_side === "right"
|
|
|
|
})
|
2020-05-19 15:38:32 +00:00
|
|
|
- let willDisplayAlt = settings.display_alt && post.children.some(p => p.data.accessibility_caption)
|
|
|
|
- let willDisplayAltInDescription = willDisplayAlt && post.children.length === 1
|
|
|
|
- let willDisplayAltInGallery = willDisplayAlt && post.children.length !== 1
|
|
|
|
|
2020-02-21 12:35:19 +00:00
|
|
|
section.description-section
|
2020-02-26 07:12:48 +00:00
|
|
|
.user-header
|
|
|
|
header.user-header-inner
|
|
|
|
img(src=post.ownerPfpCacheP width=150 height=150 alt="").pfp
|
2020-03-01 02:35:45 +00:00
|
|
|
a.name(href=`/u/${post.getBasicOwner().username}`)
|
|
|
|
if post.data.owner.full_name
|
|
|
|
= `${post.data.owner.full_name} (@${post.getBasicOwner().username})`
|
|
|
|
else
|
|
|
|
= `@${post.getBasicOwner().username}`
|
2020-02-26 07:12:48 +00:00
|
|
|
if headerWithNavigation
|
2020-03-15 06:02:38 +00:00
|
|
|
button(data-previous).navigate-posts
|
2020-03-11 10:17:40 +00:00
|
|
|
img(src="/static/img/arrow-circled.svg" alt="Previous post.").icon.previous
|
2020-03-15 06:02:38 +00:00
|
|
|
button(data-next).navigate-posts
|
2020-02-26 07:12:48 +00:00
|
|
|
img(src="/static/img/arrow-circled.svg" alt="Next post.").icon
|
2020-05-19 15:38:32 +00:00
|
|
|
|
2020-03-01 03:43:43 +00:00
|
|
|
div.relative-box
|
|
|
|
div.scrolling-box
|
2020-05-30 06:59:59 +00:00
|
|
|
div
|
|
|
|
if post.getCaption()
|
|
|
|
p.structured-text.description
|
2020-05-30 11:04:06 +00:00
|
|
|
if settings.remove_trailing_hashtags
|
|
|
|
+display_structured(post.getStructuredCaptionWithoutTrailingHashtags())
|
|
|
|
else
|
|
|
|
+display_structured(post.getStructuredCaption())
|
2020-05-19 15:38:32 +00:00
|
|
|
|
2020-05-30 06:59:59 +00:00
|
|
|
footer
|
|
|
|
if willDisplayAltInDescription
|
|
|
|
- let caption = post.children[0].data.accessibility_caption
|
|
|
|
if caption
|
|
|
|
p.description= caption
|
|
|
|
p.description
|
|
|
|
span Posted on #[time(datetime=post.date.toISOString() data-local-date)= post.getDisplayDate()].
|
2020-05-19 15:38:32 +00:00
|
|
|
|
2020-02-21 12:35:19 +00:00
|
|
|
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
|
2020-05-19 15:38:32 +00:00
|
|
|
if willDisplayAltInGallery
|
|
|
|
- let caption = entry.data.accessibility_caption
|
|
|
|
if caption
|
|
|
|
p.description.alt-in-gallery= caption
|