1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-04-01 17:21:35 +00:00

Support loading shortcodes of a single image

This commit is contained in:
Cadence Ember 2021-11-05 17:01:46 +13:00
parent d660c84941
commit 91022aa5da
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
7 changed files with 136 additions and 22 deletions

View file

@ -38,15 +38,16 @@ mixin post(post, headerWithNavigation)
- let caption = post.children[0].data.accessibility_caption
if caption
p.description= caption
p.description
span!= ll.pug_post_timestamp({post})
if post.hasDate
p.description
span!= ll.pug_post_timestamp({post})
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
video(src=entry.getVideoUrlP() controls preload="auto" width=entry.data.dimensions && entry.data.dimensions.width height=entry.data.dimensions && 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
img(src=entry.getDisplayUrlP() alt=entry.getAlt() width=entry.data.dimensions && entry.data.dimensions.width height=entry.data.dimensions && entry.data.dimensions.height).sized-image
if willDisplayAltInGallery
- let caption = entry.data.accessibility_caption
if caption