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
|
2020-01-18 15:38:14 +00:00
|
|
|
- const suggestedSize = 260 //- from css :(
|
2020-01-14 14:38:33 +00:00
|
|
|
each image in page
|
|
|
|
- const thumbnail = image.getSuggestedThumbnail(suggestedSize) //- use this as the src in case there are problems with srcset
|
2020-01-18 15:38:14 +00:00
|
|
|
a(href=`/p/${image.data.shortcode}`).sized-link
|
|
|
|
img(src=thumbnail.src alt=image.getAlt() width=thumbnail.config_width height=thumbnail.config_height srcset=image.getSrcset() sizes=image.getSizes()).sized-image
|