This commit is contained in:
Vula Builder
2026-07-14 17:42:07 +00:00
parent daf4366bc5
commit b84a8bb8b1
@@ -0,0 +1,62 @@
'use client'
import { useEmDashContent } from '@/hooks/useEmDashContent'
import Image from 'next/image'
export default function FarmsteadGallerySection() {
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-[#6b8e23] border-t-transparent animate-spin" /></div>
if (items.length === 0) return null
return (
<section id="gallery" data-vula-section="farmsteadgallery" data-vula-cms="gallery" className="py-20 bg-white">
<div className="container mx-auto px-4 max-w-6xl">
<div className="text-center mb-12 max-w-[44ch] mx-auto">
<p className="text-[#36454F] uppercase tracking-widest text-sm font-medium mb-2">Life at Die Opstal</p>
<h2 className="font-serif text-4xl md:text-5xl text-[#2c331f] leading-tight">
Sun-dappled <span className="text-[#6b8e23]">moments</span> &amp; farmyard memories
</h2>
</div>
<div className="grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-6">
{items.map((item, index) => {
const d = item.data as { title?: string; description?: string; image?: string }
const isLarge = index === 0
return (
<div
key={item.id}
className={`group relative overflow-hidden rounded-[22px] shadow-2xl ${isLarge ? 'col-span-2 row-span-2' : ''}`}
style={{ borderRadius: '999px 999px 24px 24px' }}
>
<div className="relative w-full h-64 md:h-72">
{d.image && (
<Image
src={d.image}
alt={d.title || ''}
fill
sizes="(max-width: 768px) 100vw, 50vw"
className="object-cover group-hover:scale-105 transition-transform duration-500 ease-out"
/>
)}
<div className="absolute inset-0 bg-gradient-to-t from-black/30 to-transparent" />
<div className="absolute bottom-4 left-4 right-4">
<h3 className="text-white text-xl font-semibold drop-shadow-md">{d.title}</h3>
{d.description && <p className="text-white/80 text-sm mt-1">{d.description}</p>}
</div>
</div>
</div>
)
})}
</div>
<div className="mt-10 text-center">
<p className="inline-flex items-center gap-2 text-[#36454F] text-sm">
<span className="w-1.5 h-1.5 rounded-full bg-[#6b8e23]" />
Freerange chickens under fruit trees · Homemade preserves · Endless views
</p>
</div>
</div>
</section>
)
}