Deploy
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
'use client'
|
||||
|
||||
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||
import Button from '@/components/ui/Button'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function AmacampaignsSection() {
|
||||
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-current border-t-transparent animate-spin" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (items.length === 0) return null
|
||||
|
||||
return (
|
||||
<section
|
||||
id="amacampaigns"
|
||||
data-vula-section="amacampaigns"
|
||||
data-vula-cms="campaigns"
|
||||
className="bg-[#ffffff] py-16 px-4"
|
||||
>
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<h2 className="text-4xl font-black uppercase tracking-tighter text-[#18181b] mb-8 border-b-[3px] border-[#d4af37] pb-4">
|
||||
Amacampaigns
|
||||
</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 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="relative overflow-hidden border-[3px] border-[#18181b] shadow-[6px_6px_0_0_#dc2626]"
|
||||
>
|
||||
{d.image && (
|
||||
<div className="relative h-56 md:h-64">
|
||||
<Image
|
||||
src={d.image}
|
||||
alt={d.title ?? 'Campaign'}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, 50vw"
|
||||
className="object-cover"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-[#18181b]/70 to-transparent" />
|
||||
</div>
|
||||
)}
|
||||
<div className="p-6 bg-[#ffffff]">
|
||||
<h3 className="text-xl font-black uppercase tracking-wide text-[#18181b]">
|
||||
{d.title ?? d.headline ?? ''}
|
||||
</h3>
|
||||
{d.headline && d.title ? (
|
||||
<p className="text-[#d4af37] font-bold uppercase text-sm mt-1">
|
||||
{d.headline}
|
||||
</p>
|
||||
) : null}
|
||||
{d.body && (
|
||||
<p className="text-gray-700 mt-2 text-sm leading-relaxed">
|
||||
{d.body}
|
||||
</p>
|
||||
)}
|
||||
{d.cta_text && (
|
||||
<Button
|
||||
variant="default"
|
||||
size="md"
|
||||
className="mt-4 uppercase bg-[#dc2626] hover:bg-[#b91c1c] text-white font-bold"
|
||||
>
|
||||
{d.cta_text}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user