Deploy
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
'use client'
|
||||
|
||||
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function DivaLookbookSection() {
|
||||
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-[#0077BE] border-t-transparent animate-spin" /></div>
|
||||
if (items.length === 0) return null
|
||||
|
||||
return (
|
||||
<section id="lookbook" className="py-20 bg-[#F0F8FF]" data-vula-section="divalookbook" data-vula-cms="gallery">
|
||||
<div className="max-w-7xl mx-auto px-4">
|
||||
<h2 className="text-3xl font-bold text-[#1A2B3C] mb-2">Diva Lookbook</h2>
|
||||
<p className="text-[#1A2B3C]/60 mb-10">Real women, real style – from Cape Town to Sandton.</p>
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
|
||||
{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 group cursor-pointer">
|
||||
{d.image ? (
|
||||
<div className="relative aspect-[3/4] overflow-hidden">
|
||||
<Image src={d.image} alt={d.title || ''} fill sizes="(max-width: 768px) 50vw, 25vw" className="object-cover group-hover:scale-105 transition-transform duration-500" />
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end p-4">
|
||||
<div>
|
||||
{d.title && <p className="text-white font-semibold text-sm">{d.title}</p>}
|
||||
{d.description && <p className="text-white/80 text-xs">{d.description}</p>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="aspect-[3/4] bg-gray-200 flex items-center justify-center text-gray-500">No image</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user