Deploy
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
'use client'
|
||||
|
||||
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||
import Image from 'next/image'
|
||||
import Button from '@/components/ui/Button'
|
||||
import Link from 'next/link'
|
||||
|
||||
export default function NdlovuHeritageHeroSection() {
|
||||
const { items, loading } = useVulaContent('hero_banners')
|
||||
|
||||
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="ndlovu-heritage-hero" data-vula-section="ndlovuheritagehero" data-vula-cms="hero_banners" className="relative min-h-[80vh] flex items-center overflow-hidden bg-[#f9f5f4]">
|
||||
{items.map((item) => {
|
||||
const d = item.data as { title?: string; subtitle?: string; cta_text?: string; cta_url?: string; image?: string }
|
||||
return (
|
||||
<div key={item.id} className="container mx-auto px-4 grid lg:grid-cols-2 gap-12 items-center">
|
||||
<div className="relative z-10 space-y-6">
|
||||
<h1 className="text-5xl lg:text-7xl font-bold text-[#21140d] leading-tight">{d.title}</h1>
|
||||
<p className="text-xl text-[#8b5a3c] font-serif italic max-w-xl">{d.subtitle}</p>
|
||||
{d.cta_text && d.cta_url && (
|
||||
<Link href={d.cta_url}>
|
||||
<Button variant="default" size="lg" className="bg-[#8b5a3c] hover:bg-[#6a442e] text-white">{d.cta_text}</Button>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
<div className="relative h-[60vh] lg:h-[80vh] rounded-2xl overflow-hidden shadow-2xl">
|
||||
{d.image && (
|
||||
<Image src={d.image} alt={d.title || ''} fill sizes="(max-width: 768px) 100vw, 50vw" className="object-cover" />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user