Deploy
This commit is contained in:
@@ -0,0 +1,53 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
|
export default function GuesthouseGallerySection() {
|
||||||
|
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="guesthousegallery"
|
||||||
|
data-vula-cms="gallery"
|
||||||
|
className="py-16 bg-white"
|
||||||
|
>
|
||||||
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<h2 className="text-3xl font-bold text-[#d4af37] text-center mb-4">A Visual Journey</h2>
|
||||||
|
<p className="text-center text-neutral-600 mb-12 max-w-2xl mx-auto">
|
||||||
|
Step inside KwaNtofontofo — elegant interiors, tranquil pool, braai entertainment, and nature's backdrop.
|
||||||
|
</p>
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
|
{items.map((item) => {
|
||||||
|
const d = item.data as { title?: string; description?: string; image?: string }
|
||||||
|
const imageUrl = d.image || 'https://images.pexels.com/photos/5131119/pexels-photo-5131119.jpeg?auto=compress&cs=tinysrgb&h=350'
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="group relative overflow-hidden rounded-xl border border-neutral-100 shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] transition-all duration-200 ease-out">
|
||||||
|
<div className="aspect-[4/3] relative">
|
||||||
|
<Image src={imageUrl} alt={d.title || 'Gallery image'} fill sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw" className="object-cover group-hover:scale-105 transition-transform duration-500 ease-out" />
|
||||||
|
</div>
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-black/50 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end p-4">
|
||||||
|
<div>
|
||||||
|
<h3 className="text-white font-semibold text-lg">{d.title || ''}</h3>
|
||||||
|
{d.description && <p className="text-white/80 text-sm">{d.description}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user