Fix images looking weird on mobile

This commit is contained in:
2025-11-18 12:54:27 +13:00
parent b2657962e1
commit bad4457ad7

View File

@@ -73,13 +73,13 @@ const photos = await pb.collection('photos').getFullList({
<!-- Hidden element to pass server data to client --> <!-- Hidden element to pass server data to client -->
<div class="hidden" id="carousel-data">{JSON.stringify(photos)}</div> <div class="hidden" id="carousel-data">{JSON.stringify(photos)}</div>
<div class="swiper w-full md:h-[calc(100vh-7rem)]"> <div class="swiper w-full h-[60vh] md:h-[calc(100vh-7rem)]">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
{photos.map((photo) => ( {photos.map((photo) => (
<div class="swiper-slide flex items-center justify-center"> <div class="swiper-slide flex items-center justify-center">
<img <img
src={pb.files.getURL(photo, photo.image)} src={pb.files.getURL(photo, photo.image)}
class="w-full md:h-[calc(100vh-7rem)] object-contain" class="w-full h-full object-contain"
alt={photo.title || 'Photo'} alt={photo.title || 'Photo'}
/> />
</div> </div>