Deploy
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
'use client'
|
||||||
|
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||||
|
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="h-8 w-8 animate-spin rounded-full border-2 border-current border-t-transparent" /></div>
|
||||||
|
}
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="gallery" data-vula-section="gallery" data-vula-cms="gallery" className="bg-[#f7f9f4] py-20">
|
||||||
|
<div className="mx-auto max-w-7xl px-4">
|
||||||
|
<div className="mb-12 max-w-2xl">
|
||||||
|
<p className="text-sm font-semibold uppercase tracking-widest text-[#ea580c]">Styled in Durban</p>
|
||||||
|
<h2 className="mt-2 font-display text-3xl font-semibold text-[#1b210d] md:text-4xl">Real rooms, honest texture</h2>
|
||||||
|
<p className="mt-3 text-[#36454F]">A living lookbook of Ukaya pieces styled in local interiors — from Morningside flats to Umhlanga homes.</p>
|
||||||
|
</div>
|
||||||
|
<div className="grid auto-rows-[180px] grid-cols-2 gap-3 md:grid-cols-4 md:gap-4">
|
||||||
|
{items.map((item, index) => {
|
||||||
|
const d = item.data as { title?: string; description?: string; image?: string }
|
||||||
|
const isLarge = index % 3 === 0
|
||||||
|
return (
|
||||||
|
<figure key={item.id} className={`group relative overflow-hidden rounded-2xl ${isLarge ? 'col-span-2 row-span-2' : index % 3 === 1 ? 'row-span-2' : ''}`}>
|
||||||
|
{d.image ? (
|
||||||
|
<Image src={d.image} alt={d.title ?? 'Ukaya Home in a real interior'} fill sizes="(max-width: 768px) 100vw, 25vw" className="object-cover transition-transform duration-500 ease-out group-hover:scale-105" />
|
||||||
|
) : (
|
||||||
|
<div className="absolute inset-0 bg-[#6b8e23]" />
|
||||||
|
)}
|
||||||
|
{d.title || d.description ? (
|
||||||
|
<figcaption className="absolute inset-x-0 bottom-0 bg-gradient-to-t from-[#1b210d]/85 to-transparent p-4">
|
||||||
|
{d.title ? <p className="font-display text-lg font-semibold text-white">{d.title}</p> : null}
|
||||||
|
{d.description ? <p className="mt-1 line-clamp-2 text-sm text-white/80">{d.description}</p> : null}
|
||||||
|
</figcaption>
|
||||||
|
) : null}
|
||||||
|
</figure>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user