Skip to content

Commit 77b7418

Browse files
committed
make venue images scrollable like a carousel on mobile
1 parent ae97aff commit 77b7418

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/sections/Venue.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ const venuePhotos = [
3535
<VenueContent />
3636
</Prose>
3737

38-
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12">
38+
{/* Mobile: swipeable scroll-snap carousel, peeking edge hints it scrolls */}
39+
<div class="flex overflow-x-auto snap-x snap-mandatory gap-4 mt-12 sm:grid sm:grid-cols-2">
3940
{venuePhotos.map((photo) => (
40-
<figure class="relative">
41+
<figure class="relative flex-none w-5/6 snap-start sm:w-full">
4142
{/* alt is empty: photo.alt is rendered once below as the visible figcaption, so it's not read twice by screen readers */}
4243
<Image
4344
src={photo.src}

0 commit comments

Comments
 (0)