gallery img sizing

This commit is contained in:
Martti Malmi
2024-01-11 09:21:20 +02:00
parent 8043f1034f
commit 45f66fd139

View File

@ -225,7 +225,7 @@ export default function Text({
height, height,
}; };
}); });
const size = Math.floor(baseImageWidth / Math.min(4, Math.floor(Math.sqrt(galleryImages.length)))); const size = Math.floor(baseImageWidth / Math.min(4, Math.ceil(Math.sqrt(galleryImages.length))));
const gallery = ( const gallery = (
<div className="-mx-4 md:mx-0 my-2 gallery"> <div className="-mx-4 md:mx-0 my-2 gallery">
{imagesWithGridConfig.map(img => ( {imagesWithGridConfig.map(img => (