forked from DebaucheryLibrarian/traxxx
Added filter bar to all pages. Added 'upcoming' marker. Improved date tidbit.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user