Deploy
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
'use client'
|
||||
|
||||
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||
import { Card } from '@/components/ui/Card'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function GallerySection() {
|
||||
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="gallery" data-vula-section="gallery" data-vula-cms="gallery" className="py-24 bg-[#0f0f17]">
|
||||
<div className="container mx-auto px-4">
|
||||
<h2 className="text-3xl font-light text-[#e7e7ee] tracking-wide uppercase text-center mb-12">Gallery</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{items.map((item) => {
|
||||
const d = item.data as { title?: string; description?: string; image?: string }
|
||||
if (!d.image) return null
|
||||
return (
|
||||
<Card key={item.id} className="bg-[#18181b] border border-[#303040] overflow-hidden group relative">
|
||||
<div className="relative aspect-square">
|
||||
<Image src={d.image} alt={d.title ?? ''} fill sizes="(max-width: 768px) 100vw, 33vw" className="object-cover transition-transform duration-500 group-hover:scale-105" />
|
||||
</div>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end p-4">
|
||||
<div>
|
||||
<h3 className="text-white font-medium text-sm">{d.title}</h3>
|
||||
{d.description && <p className="text-white/70 text-xs mt-1">{d.description}</p>}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user