1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-16 21:27:30 +00:00
bibliogram/src/site/pug/includes/timeline_page.pug

15 lines
608 B
Plaintext
Raw Normal View History

2020-01-12 12:50:21 +00:00
//- Needs page, pageIndex
mixin timeline_page(page, pageIndex)
2020-01-14 14:38:33 +00:00
section.timeline-page
- const pageNumber = pageIndex + 1
if pageNumber > 1
header.page-number(id=`page-${pageNumber}`)
span.number Page #{pageNumber}
2020-01-12 12:50:21 +00:00
2020-01-14 14:38:33 +00:00
.timeline-inner
- const suggestedSize = 300
each image in page
- const thumbnail = image.getSuggestedThumbnail(suggestedSize) //- use this as the src in case there are problems with srcset
img(src=image.getProxy(thumbnail.src) alt=image.getAlt() width=thumbnail.config_width height=thumbnail.config_height srcset=image.getSrcset() sizes=`${suggestedSize}px`).image