bibliogram/src/site/pug/includes/timeline_page.pug

17 lines
786 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
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.getSuggestedThumbnailP(suggestedSize) //- use this as the src in case there are problems with srcset
2020-02-21 12:35:19 +00:00
a(href=`/p/${image.data.shortcode}` data-shortcode=image.data.shortcode).sized-link
//- using config_width twice because the proxy makes it square
img(src=thumbnail.src alt=image.getAlt() width=thumbnail.config_width height=thumbnail.config_width srcset=image.getThumbnailSrcsetP() sizes=image.getThumbnailSizes()).sized-image