Deploy
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import Image from 'next/image'
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
|
||||||
|
export default function GallerySection() {
|
||||||
|
const { items, loading } = useEmDashContent('gallery')
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<div data-vula-section="gallery" className="flex justify-center py-16">
|
||||||
|
<div className="w-8 h-8 rounded-full border-2 border-[#ea580c] border-t-transparent animate-spin" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="gallery" className="py-20 bg-[#ffffff]">
|
||||||
|
<div className="max-w-6xl mx-auto px-4">
|
||||||
|
<h2 className="text-3xl lg:text-4xl font-bold tracking-tight text-center mb-12 text-[#dc2626]">Our Gallery</h2>
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
|
{items.map((item) => {
|
||||||
|
const data = item.data as { title?: string; description?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="group relative aspect-video overflow-hidden rounded-xl border border-[#e5e7eb] shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] hover:-translate-y-0.5 transition-all duration-200 ease-out">
|
||||||
|
{data.image && (
|
||||||
|
<Image
|
||||||
|
src={data.image}
|
||||||
|
alt={data.title || 'Gallery image'}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||||
|
className="object-cover transition-transform duration-500 ease-out group-hover:scale-105"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
||||||
|
<div className="absolute bottom-4 left-4 right-4">
|
||||||
|
{data.title && <h3 className="text-white font-semibold text-lg">{data.title}</h3>}
|
||||||
|
{data.description && <p className="text-white/80 text-sm mt-1">{data.description}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user