Deploy
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
|
export default function BoutiqueGallerySection() {
|
||||||
|
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-current border-t-transparent animate-spin" /></div>
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="gallery" data-vula-section="boutiquegallery" data-vula-cms="gallery" className="bg-white py-16">
|
||||||
|
<div className="max-w-7xl mx-auto px-4">
|
||||||
|
<h2 className="text-3xl md:text-4xl font-bold text-[#210d0d] mb-3 tracking-tight">Moments that linger long after you leave</h2>
|
||||||
|
<p className="text-[#210d0d] opacity-70 mb-10 max-w-xl">From golden sunrises to candlelit dinners—our curated gallery captures the soul of Masai Suites.</p>
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6">
|
||||||
|
{items.slice(0, 6).map((item) => {
|
||||||
|
const d = item.data as { title?: string; description?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="group relative aspect-[4/3] rounded-xl overflow-hidden shadow-[0_4px_20px_rgba(210,13,13,0.06)] border border-[#e2d4d4]">
|
||||||
|
{d.image && (
|
||||||
|
<Image
|
||||||
|
src={d.image}
|
||||||
|
alt={d.title || 'Gallery image'}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||||
|
className="object-cover transition-transform duration-500 group-hover:scale-105"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-[#210d0d]/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end p-4">
|
||||||
|
<div>
|
||||||
|
{d.title && <p className="text-white font-semibold text-sm">{d.title}</p>}
|
||||||
|
{d.description && <p className="text-white/80 text-xs mt-0.5 line-clamp-1">{d.description}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user