1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-03-02 10:41:36 +00:00

First release

This commit is contained in:
Cadence Fish 2020-01-13 01:50:21 +13:00
parent 32e4f3d854
commit 6fd7cc501e
No known key found for this signature in database
GPG key ID: 81015DF9AA8607E1
31 changed files with 2759 additions and 348 deletions

View file

@ -0,0 +1,5 @@
mixin image(url)
-
let params = new URLSearchParams()
params.set("url", url)
img(src="/imageproxy?"+params.toString())&attributes(attributes)

View file

@ -0,0 +1,15 @@
//- Needs page, pageIndex
include image.pug
mixin timeline_page(page, pageIndex)
- const pageNumber = pageIndex + 1
if pageNumber > 1
.page-number(id=`page-${pageNumber}`)
span.number Page #{pageNumber}
.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
+image(thumbnail.src)(alt=image.getAlt() width=thumbnail.config_width height=thumbnail.config_height srcset=image.getSrcset() sizes=`${suggestedSize}px`).image