Deploy
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
'use client'
|
||||
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function KwaNtofontofoGallerySection() {
|
||||
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 text-[#C0392B]" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (items.length === 0) return null
|
||||
|
||||
return (
|
||||
<section
|
||||
id="kwantofontofogallery"
|
||||
data-vula-section="kwantofontofogallery"
|
||||
data-vula-cms="gallery"
|
||||
className="py-20 bg-[#FDF6EC]"
|
||||
>
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6">
|
||||
<h2 className="text-4xl font-bold text-[#2C1810] mb-12 text-center">Gallery</h2>
|
||||
<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 }
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className="rounded-xl overflow-hidden bg-white shadow-md border-2 border-[#E67E22]"
|
||||
>
|
||||
<div className="relative h-48 w-full">
|
||||
<Image
|
||||
src={d.image || ''}
|
||||
alt={d.title || 'Gallery image'}
|
||||
fill
|
||||
className="object-cover"
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||
/>
|
||||
</div>
|
||||
<div className="p-5">
|
||||
<h3 className="text-lg font-semibold text-[#2C1810]">{d.title}</h3>
|
||||
{d.description && (
|
||||
<p className="mt-2 text-sm text-gray-600">{d.description}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user