Deploy
This commit is contained in:
@@ -0,0 +1,73 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useVulaContent } from "@/hooks/useVulaContent"
|
||||||
|
import Image from "next/image"
|
||||||
|
|
||||||
|
interface GalleryItem {
|
||||||
|
id: string
|
||||||
|
data: {
|
||||||
|
title?: string
|
||||||
|
description?: string
|
||||||
|
image?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function StreetStyleGallerySection() {
|
||||||
|
const { items, loading } = useVulaContent("gallery")
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<section className="bg-[#101418] py-20">
|
||||||
|
<div className="flex justify-center">
|
||||||
|
<div className="w-8 h-8 rounded-full border-2 border-[#d4af37] border-t-transparent animate-spin" />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section
|
||||||
|
id="gallery"
|
||||||
|
data-vula-section="streetstylegallery"
|
||||||
|
data-vula-cms="gallery"
|
||||||
|
className="bg-[#101418] py-16 lg:py-24 border-t-[3px] border-[#d4af37]"
|
||||||
|
>
|
||||||
|
<div className="container mx-auto px-4">
|
||||||
|
<h2 className="text-3xl lg:text-5xl font-bold uppercase text-white tracking-tight mb-8 text-center">
|
||||||
|
Street Style Gallery
|
||||||
|
</h2>
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
|
{(items as GalleryItem[]).slice(0, 6).map((item) => {
|
||||||
|
const d = item.data
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="relative group bg-white border-[3px] border-[#101418] shadow-[6px_6px_0_0_#16a34a] hover:shadow-[3px_3px_0_0_#16a34a] transition-all duration-200 overflow-hidden">
|
||||||
|
{d.image && (
|
||||||
|
<div className="aspect-square overflow-hidden relative">
|
||||||
|
<Image
|
||||||
|
src={d.image}
|
||||||
|
alt={d.title || "Street style"}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 768px) 100vw, 33vw"
|
||||||
|
className="object-cover grayscale contrast-150 group-hover:scale-105 transition-transform duration-500"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-end p-4">
|
||||||
|
<div>
|
||||||
|
{d.title && <h3 className="text-white font-bold uppercase text-lg">{d.title}</h3>}
|
||||||
|
{d.description && <p className="text-white/80 text-sm mt-1">{d.description}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
<div className="mt-10 text-center">
|
||||||
|
<p className="text-white/60 text-sm uppercase tracking-widest">Tag #MzansiStyle for a chance to be featured.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user