Deploy
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
'use client'
|
||||
|
||||
import { useVulaContent } from "@/hooks/useVulaContent"
|
||||
import Button from "@/components/ui/Button"
|
||||
import Image from "next/image"
|
||||
|
||||
export default function DropCampaignsSection() {
|
||||
const { items, loading } = useVulaContent("campaigns")
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="flex justify-center py-16">
|
||||
<div className="w-8 h-8 rounded-full border-2 border-[#ea580c] border-t-transparent animate-spin" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (items.length === 0) return null
|
||||
|
||||
return (
|
||||
<section
|
||||
id="drops"
|
||||
data-vula-section="drops"
|
||||
data-vula-cms="campaigns"
|
||||
className="bg-white py-20 px-4"
|
||||
>
|
||||
<div className="max-w-7xl mx-auto">
|
||||
<h2 className="text-4xl md:text-5xl font-black uppercase tracking-tight text-[#18181b] mb-2">
|
||||
DROP CAMPAIGNS
|
||||
</h2>
|
||||
<p className="text-[#ea580c] uppercase tracking-widest text-sm mb-10">
|
||||
Limited drops — move before they vanish
|
||||
</p>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{items.map((item) => {
|
||||
const d = item.data as { title?: string; headline?: string; body?: string; cta_text?: string; image?: string }
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className="bg-[#18181b] border-2 border-[#ea580c] shadow-[6px_6px_0_0_#16a34a] rounded-none overflow-hidden"
|
||||
>
|
||||
{d.image && (
|
||||
<div className="relative h-56 overflow-hidden">
|
||||
<Image
|
||||
src={d.image}
|
||||
alt={d.title ?? "Campaign image"}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, 50vw"
|
||||
className="object-cover"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-[#18181b] to-transparent" />
|
||||
</div>
|
||||
)}
|
||||
<div className="p-6">
|
||||
<h3 className="text-2xl font-black uppercase text-white tracking-tight">
|
||||
{d.title}
|
||||
</h3>
|
||||
{d.headline && (
|
||||
<p className="text-[#ea580c] uppercase text-sm mt-1 font-bold">
|
||||
{d.headline}
|
||||
</p>
|
||||
)}
|
||||
{d.body && (
|
||||
<p className="text-gray-300 mt-3 text-sm leading-relaxed">
|
||||
{d.body}
|
||||
</p>
|
||||
)}
|
||||
{d.cta_text && (
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
className="mt-4 bg-[#ea580c] text-white border-2 border-[#18181b] shadow-[3px_3px_0_0_#16a34a] uppercase font-black"
|
||||
>
|
||||
{d.cta_text}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user