Deploy
This commit is contained in:
@@ -0,0 +1,46 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||||
|
import Button from '@/components/ui/Button'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import { Card, CardContent } from '@/components/ui/Card'
|
||||||
|
|
||||||
|
export default function StyleObsessionsCampaignSection() {
|
||||||
|
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-[#0077BE] border-t-transparent animate-spin" /></div>
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="style-obsessions" className="py-20 bg-[#FFFFFF]" data-vula-section="styleobsessionscampaign" data-vula-cms="campaigns">
|
||||||
|
<div className="max-w-7xl mx-auto px-4">
|
||||||
|
<h2 className="text-3xl font-bold text-[#1A2B3C] mb-2">Style Obsessions</h2>
|
||||||
|
<p className="text-[#1A2B3C]/60 mb-10">Limited edition drops and seasonal edits.</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 (
|
||||||
|
<Card key={item.id} className="rounded-xl overflow-hidden bg-white shadow-md">
|
||||||
|
{d.image && (
|
||||||
|
<div className="relative h-48 w-full overflow-hidden">
|
||||||
|
<Image src={d.image} alt={d.title || ''} fill sizes="(max-width: 768px) 100vw, 33vw" className="object-cover" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<CardContent className="p-5">
|
||||||
|
{d.headline && <p className="uppercase text-xs tracking-widest text-[#00A8CC] mb-2">{d.headline}</p>}
|
||||||
|
<h3 className="text-xl font-bold text-[#1A2B3C]">{d.title}</h3>
|
||||||
|
{d.body && <p className="text-[#1A2B3C]/70 mt-2 text-sm line-clamp-3">{d.body}</p>}
|
||||||
|
{d.cta_text && (
|
||||||
|
<Button variant="default" size="sm" className="mt-4 bg-[#FFD700] text-black hover:bg-yellow-500">
|
||||||
|
{d.cta_text}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user