Deploy
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
'use client'
|
||||
|
||||
import Image from 'next/image'
|
||||
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||
|
||||
interface GalleryItemData {
|
||||
title?: string
|
||||
description?: string
|
||||
image?: string
|
||||
}
|
||||
|
||||
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="bg-[#fbbf24] py-20">
|
||||
<div className="mx-auto max-w-7xl px-4">
|
||||
<div className="mb-10 flex flex-col gap-4 border-l-4 border-[#18181b] pl-4">
|
||||
<p className="text-sm font-bold uppercase tracking-[0.3em] text-[#18181b]">Raw feed / #KasiDripFam</p>
|
||||
<h2 className="max-w-2xl text-4xl font-black uppercase text-[#18181b] md:text-6xl">You copped. Now show off.</h2>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4 md:grid-cols-3">
|
||||
{items.slice(0, 6).map((item, index) => {
|
||||
const d = (item.data ?? {}) as GalleryItemData
|
||||
return (
|
||||
<article key={item.id} className={`group relative aspect-square overflow-hidden border-2 border-[#18181b] shadow-[6px_6px_0_0_#18181b] ${index === 0 ? 'md:col-span-2 md:row-span-2' : ''}`}>
|
||||
{d.image ? (
|
||||
<Image src={d.image} alt={d.title ?? 'Kasi Drip gallery'} fill sizes="(max-width: 768px) 100vw, 33vw" className="object-cover transition-transform duration-500 ease-out group-hover:scale-105" />
|
||||
) : (
|
||||
<div className="flex h-full items-center justify-center bg-[#18181b] text-4xl font-black text-[#fbbf24]">KD</div>
|
||||
)}
|
||||
<div className="absolute inset-0 flex items-end bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-0 transition-opacity duration-200 ease-out group-hover:opacity-100">
|
||||
<div className="p-4">
|
||||
{d.title ? <h3 className="text-lg font-black uppercase text-white">{d.title}</h3> : null}
|
||||
{d.description ? <p className="mt-1 text-sm text-white/80">{d.description}</p> : null}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<p className="mt-10 text-center text-sm font-bold uppercase tracking-widest text-[#18181b]">Tag @kasidrip — you might make the feed.</p>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user