Deploy
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
'use client'
|
||||
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||
import { Card, CardContent } from '@/components/ui/Card'
|
||||
import Button from '@/components/ui/Button'
|
||||
import Link from 'next/link'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function CampaignsSection() {
|
||||
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-[#d4af37] border-t-transparent animate-spin" /></div>
|
||||
if (items.length === 0) return null
|
||||
return (
|
||||
<section id="campaigns" data-vula-section="campaigns" data-vula-cms="campaigns" className="py-16 bg-[#18181b] text-white border-t-[3px] border-[#d4af37]">
|
||||
<div className="container mx-auto px-4">
|
||||
<h2 className="text-4xl font-black uppercase tracking-tight text-[#d4af37] mb-8" style={{ fontFamily: 'Archivo Black, sans-serif', WebkitTextStroke: '0.5px #d4af37' }}>Drop Campaigns</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 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="relative overflow-hidden border-[3px] border-[#d4af37] shadow-[6px_6px_0_0_#d4af37] bg-[#18181b] group transition-all duration-200 ease-out hover:shadow-[3px_3px_0_0_#dc2626] hover:-translate-x-[3px] hover:-translate-y-[3px]">
|
||||
<div className="relative h-64 overflow-hidden">
|
||||
{d.image && (
|
||||
<Image src={d.image} alt={d.title || 'Campaign'} fill sizes="(max-width: 768px) 100vw, 50vw" className="object-cover group-hover:scale-105 transition-transform duration-500 ease-out" />
|
||||
)}
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-[#18181b] via-transparent to-transparent" />
|
||||
</div>
|
||||
<CardContent className="p-6">
|
||||
{d.title && <h3 className="text-2xl font-black uppercase text-[#d4af37]">{d.title}</h3>}
|
||||
{d.headline && <p className="text-xl font-bold uppercase mt-1">{d.headline}</p>}
|
||||
{d.body && <p className="text-sm mt-2 text-gray-300 line-clamp-3">{d.body}</p>}
|
||||
<div className="mt-4">
|
||||
<Link href="/products">
|
||||
<Button variant="default" size="md" className="bg-[#d4af37] text-[#18181b] hover:bg-[#dc2626] hover:text-white uppercase font-bold border-[2px] border-[#d4af37] shadow-[3px_3px_0_0_#dc2626]">
|
||||
{d.cta_text || 'Shop the Look'}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user