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:
parent
d660c84941
commit
91022aa5da
7 changed files with 136 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue