Deploy
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
'use client'
|
||||
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function GallerySection() {
|
||||
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-[#4CAF50] border-t-transparent animate-spin" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (items.length === 0) return null
|
||||
|
||||
return (
|
||||
<section id="gallery" data-vula-section="gallery" data-vula-cms="gallery" className="bg-white py-20 px-4">
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<h2 className="text-3xl font-bold text-[#1B3A1F] mb-8 text-center">La Nostra Galleria</h2>
|
||||
<div className="columns-1 md:columns-2 lg:columns-3 gap-4 space-y-4">
|
||||
{items.map((item) => {
|
||||
const d = item.data as { title?: string; description?: string; image?: string }
|
||||
return (
|
||||
<div key={item.id} className="break-inside-avoid rounded-xl overflow-hidden bg-white shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] transition-all duration-200 ease-out group relative">
|
||||
<div className="relative">
|
||||
<Image src={d.image || '/placeholder.jpg'} alt={d.title || ''} width={600} height={400} className="w-full h-auto object-cover group-hover:scale-105 transition-transform duration-500 ease-out" />
|
||||
<div className="absolute inset-0 bg-[#8BC34A] opacity-0 group-hover:opacity-30 transition-opacity duration-300" />
|
||||
<div className="absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
||||
{d.title && <h3 className="text-white font-semibold">{d.title}</h3>}
|
||||
{d.description && <p className="text-white/80 text-xs">{d.description}</p>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user