Deploy
This commit is contained in:
@@ -0,0 +1,89 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useVulaContent } from "@/hooks/useVulaContent"
|
||||||
|
import Image from "next/image"
|
||||||
|
import Link from "next/link"
|
||||||
|
import Button from "@/components/ui/Button"
|
||||||
|
import Badge from "@/components/ui/Badge"
|
||||||
|
|
||||||
|
interface Campaign {
|
||||||
|
id: string
|
||||||
|
data: {
|
||||||
|
title?: string
|
||||||
|
headline?: string
|
||||||
|
body?: string
|
||||||
|
cta_text?: string
|
||||||
|
image?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function HypeCampaignsSection() {
|
||||||
|
const { items, loading } = useVulaContent("campaigns")
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<section className="bg-white py-20">
|
||||||
|
<div className="flex justify-center">
|
||||||
|
<div className="w-8 h-8 rounded-full border-2 border-[#ea580c] border-t-transparent animate-spin" />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section
|
||||||
|
id="campaigns"
|
||||||
|
data-vula-section="hypecampaigns"
|
||||||
|
data-vula-cms="campaigns"
|
||||||
|
className="bg-white py-16 lg:py-24 border-t-[3px] border-b-[3px] border-[#16a34a]"
|
||||||
|
>
|
||||||
|
<div className="container mx-auto px-4">
|
||||||
|
<h2 className="text-3xl lg:text-5xl font-bold uppercase text-[#101418] tracking-tight mb-8 text-center">
|
||||||
|
Hype Campaigns
|
||||||
|
</h2>
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||||
|
{(items as Campaign[]).map((item) => {
|
||||||
|
const d = item.data
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="relative bg-[#101418] border-[3px] border-[#ea580c] shadow-[6px_6px_0_0_#16a34a] group hover:shadow-[3px_3px_0_0_#16a34a] transition-all duration-200">
|
||||||
|
{d.image && (
|
||||||
|
<div className="aspect-video overflow-hidden relative">
|
||||||
|
<Image
|
||||||
|
src={d.image}
|
||||||
|
alt={d.title || "Campaign"}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 768px) 100vw, 33vw"
|
||||||
|
className="object-cover grayscale contrast-125 group-hover:scale-105 transition-transform duration-500"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="p-6 border-t-[3px] border-[#ea580c]">
|
||||||
|
{d.headline && (
|
||||||
|
<h3 className="text-2xl font-bold uppercase text-white tracking-tight mb-2">
|
||||||
|
{d.headline}
|
||||||
|
</h3>
|
||||||
|
)}
|
||||||
|
{d.title && !d.headline && (
|
||||||
|
<h3 className="text-xl font-bold uppercase text-white">{d.title}</h3>
|
||||||
|
)}
|
||||||
|
{d.body && <p className="text-gray-300 mt-2 text-sm">{d.body}</p>}
|
||||||
|
<div className="flex items-center gap-4 mt-4">
|
||||||
|
{d.cta_text && (
|
||||||
|
<Link href="/products">
|
||||||
|
<Button variant="outline" size="sm" className="border-white text-white hover:bg-white hover:text-black transition-all duration-200">
|
||||||
|
{d.cta_text}
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user