Deploy
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
'use client'
|
||||
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function IsithombeGallerySection() {
|
||||
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="isithombegallery"
|
||||
data-vula-section="isithombegallery"
|
||||
data-vula-cms="gallery"
|
||||
className="py-20 bg-[#f9f7f4]"
|
||||
>
|
||||
<div className="max-w-7xl mx-auto px-4">
|
||||
<h2 className="text-4xl font-semibold text-[#211c0d] mb-2 text-center">
|
||||
Visual Stories from the Bush
|
||||
</h2>
|
||||
<p className="text-lg text-[#211c0d]/70 mb-12 text-center max-w-2xl mx-auto">
|
||||
From intimate suite details to sweeping bushveld sunsets — each image captures the soul of Zulu Lodge.
|
||||
</p>
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 gap-4">
|
||||
{items.map((item) => {
|
||||
const d = item.data as {
|
||||
title?: string
|
||||
description?: string
|
||||
image?: string
|
||||
}
|
||||
return (
|
||||
<div key={item.id} className="group relative aspect-square overflow-hidden rounded-xl shadow-lg">
|
||||
<Image
|
||||
src={d.image ?? '/placeholder.jpg'}
|
||||
alt={d.title ?? 'Gallery image'}
|
||||
fill
|
||||
sizes="(max-width: 768px) 50vw, (max-width: 1024px) 33vw, 25vw"
|
||||
className="object-cover group-hover:scale-105 transition-transform duration-500 ease-out"
|
||||
/>
|
||||
<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>
|
||||
<p className="text-white font-semibold text-sm">{d.title}</p>
|
||||
{d.description && (
|
||||
<p className="text-white/80 text-xs mt-1">{d.description}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user