Deploy
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
'use client'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||||
|
|
||||||
|
export default function UmuziGallerySection() {
|
||||||
|
const { items, loading } = useVulaContent('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="umuzigallery" data-vula-section="umuzigallery" data-vula-cms="gallery" className="py-16 bg-white">
|
||||||
|
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div className="text-center mb-10">
|
||||||
|
<h2 className="text-3xl font-bold text-gray-900">Gallery</h2>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4">
|
||||||
|
{items.map((item) => {
|
||||||
|
const d = item.data as { title?: string; description?: string; image?: string }
|
||||||
|
return d.image ? (
|
||||||
|
<div key={item.id} className="group relative aspect-square rounded-xl overflow-hidden bg-gray-100">
|
||||||
|
<Image src={d.image} alt={d.title || ''} fill className="object-cover group-hover:scale-110 transition-transform duration-500" />
|
||||||
|
{d.title && (
|
||||||
|
<div className="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-end p-3">
|
||||||
|
<p className="text-white text-sm font-medium">{d.title}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
) : null
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user