Added filter bar to all pages. Added 'upcoming' marker. Improved date tidbit.

This commit is contained in:
2019-11-15 05:10:59 +01:00
parent a612045ee0
commit 5620dfcb65
18 changed files with 180 additions and 55 deletions

View File

@@ -2,7 +2,7 @@
// pick {photoLimit} photos evenly distributed photos from a set with {photoTotal} photos, return array of indexes starting at 1
function pluckPhotos(photoTotal, photoLimit) {
return [1].concat(Array.from({ length: photoLimit - 1 }, (value, index) => Math.floor((index + 1) * (photoTotal / (photoLimit - 1)))));
return [1].concat(Array.from({ length: photoLimit - 1 }, (value, index) => Math.round((index + 1) * (photoTotal / (photoLimit - 1)))));
}
module.exports = pluckPhotos;