This commit is contained in:
Vula Builder
2026-07-25 11:17:58 +00:00
parent a6e8460862
commit 190a6bf9a9
@@ -0,0 +1,80 @@
'use client'
import { useEmDashContent } from '@/hooks/useEmDashContent'
import Image from 'next/image'
export default function EarthyMomentsGallerySection() {
const { items, loading } = useEmDashContent('gallery')
if (loading) {
return (
<div className="flex justify-center py-16">
<div className="w-8 h-8 rounded-full border-2 border-[#C0392B] border-t-transparent animate-spin" />
</div>
)
}
if (items.length === 0) return null
return (
<section
id="earthy-moments"
data-vula-section="earthymomentsgallery"
data-vula-cms="gallery"
className="py-20 bg-[#FDF6EC]"
>
<div className="max-w-7xl mx-auto px-4">
<div className="text-center mb-12">
<span className="text-[#E67E22] text-sm font-semibold tracking-widest uppercase">
Visual Stories
</span>
<h2 className="text-4xl font-bold text-[#2C1810] mt-2">
Earthy Moments
</h2>
<p className="text-[#2C1810]/70 max-w-2xl mx-auto mt-4">
A glimpse into the soul of Masai Suites
</p>
</div>
<div className="columns-1 sm:columns-2 lg:columns-3 gap-6 space-y-6">
{items.map((item) => {
const d = item.data as {
title?: string
description?: string
image?: string
}
return (
<div
key={item.id}
className="break-inside-avoid rounded-xl overflow-hidden bg-white shadow-lg hover:shadow-xl transition-shadow duration-200 group"
>
{d.image && (
<div className="relative w-full h-auto">
<Image
src={d.image}
alt={d.title ?? 'Gallery image'}
width={600}
height={400}
className="object-cover w-full h-auto group-hover:scale-105 transition-transform duration-500 ease-out"
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
/>
</div>
)}
<div className="p-4">
<h3 className="text-lg font-semibold text-[#2C1810]">
{d.title}
</h3>
{d.description && (
<p className="text-[#2C1810]/60 text-sm mt-1">
{d.description}
</p>
)}
</div>
</div>
)
})}
</div>
</div>
</section>
)
}