This commit is contained in:
Vula Builder
2026-06-23 08:47:20 +00:00
parent 21c129ca9b
commit cb90d43723
@@ -0,0 +1,95 @@
'use client'
import { useEmDashContent } from '@/hooks/useEmDashContent'
import Image from 'next/image'
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card'
import Button from '@/components/ui/Button'
import { ArrowRight } from 'lucide-react'
export default function DropCampaignsSection() {
const { items, loading } = useEmDashContent('campaigns')
if (loading) {
return (
<div className="flex justify-center py-16">
<div className="w-8 h-8 rounded-full border-2 border-[#18181b] border-t-transparent animate-spin" />
</div>
)
}
if (items.length === 0) return null
return (
<section
id="campaigns"
data-vula-section="dropcampaigns"
data-vula-cms="campaigns"
className="bg-[#ffffff] py-20 px-4"
>
<div className="max-w-7xl mx-auto">
<h2 className="text-4xl md:text-5xl font-black text-[#18181b] mb-4 uppercase tracking-tight">
Drop Campaigns
</h2>
<p className="text-lg text-[#36454F] mb-12 max-w-2xl">
Limited drops, collabs, and special releases grab before they vanish.
</p>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{items.map((item) => {
const d = item.data as {
title?: string
headline?: string
body?: string
cta_text?: string
image?: string
}
return (
<Card
key={item.id}
className="rounded-xl border border-neutral-200 bg-white shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] hover:-translate-y-1 transition-all duration-200 ease-out overflow-hidden group cursor-pointer"
>
{d.image && (
<div className="relative w-full h-48 overflow-hidden">
<Image
src={d.image}
alt={d.title || 'Campaign image'}
fill
sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
className="object-cover transition-transform duration-500 ease-out group-hover:scale-105"
/>
</div>
)}
<CardHeader className="pb-2">
<CardTitle className="text-xl font-bold text-[#18181b]">
{d.title}
</CardTitle>
{d.headline && (
<p className="text-sm text-[#36454F] font-medium uppercase tracking-widest">
{d.headline}
</p>
)}
</CardHeader>
<CardContent>
{d.body && (
<p className="text-[#111827] text-base leading-relaxed mb-4 line-clamp-3">
{d.body}
</p>
)}
{d.cta_text && (
<Button
variant="default"
className="bg-[#18181b] text-white hover:bg-[#36454F] transition-all duration-200"
>
{d.cta_text} <ArrowRight className="ml-2 h-4 w-4 inline" />
</Button>
)}
</CardContent>
</Card>
)
})}
</div>
</div>
</section>
)
}