Deploy
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
'use client'
|
||||
|
||||
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function SowetoStyleGallerySection() {
|
||||
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="soweto-style-gallery"
|
||||
data-vula-section="soweto-style-gallery"
|
||||
data-vula-cms="gallery"
|
||||
className="bg-[#18181b] py-16 px-4"
|
||||
>
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<h2 className="text-4xl font-black uppercase tracking-tighter text-[#ffffff] mb-2">
|
||||
Soweto Style Gallery
|
||||
</h2>
|
||||
<p className="text-[#d4af37] font-bold uppercase text-sm mb-8 tracking-widest">
|
||||
Check the drip
|
||||
</p>
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 gap-4">
|
||||
{items.map((item) => {
|
||||
const d = item.data as {
|
||||
title?: string
|
||||
description?: string
|
||||
image?: string
|
||||
}
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className="relative overflow-hidden border-[3px] border-[#d4af37] shadow-[4px_4px_0_0_#dc2626] group cursor-pointer"
|
||||
>
|
||||
{d.image ? (
|
||||
<div className="relative aspect-square">
|
||||
<Image
|
||||
src={d.image}
|
||||
alt={d.title ?? 'Gallery photo'}
|
||||
fill
|
||||
sizes="(max-width: 768px) 50vw, 33vw"
|
||||
className="object-cover transition-transform duration-500 ease-out group-hover:scale-105"
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="aspect-square bg-gray-800 flex items-center justify-center">
|
||||
<span className="text-gray-500 uppercase text-sm">No image</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-[#18181b]/80 to-transparent p-3">
|
||||
<h3 className="text-white font-bold uppercase text-sm truncate">
|
||||
{d.title ?? ''}
|
||||
</h3>
|
||||
{d.description && (
|
||||
<p className="text-gray-300 text-xs mt-1 truncate">{d.description}</p>
|
||||
)}
|
||||
<span className="text-[#d4af37] text-xs font-bold mt-1 block">
|
||||
#WearYourKasi
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user