Deploy
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useVulaContent } from '@/hooks/useVulaContent'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
|
export default function IndigenousIngredientGallerySection() {
|
||||||
|
const { items, loading } = useVulaContent('gallery')
|
||||||
|
|
||||||
|
if (loading) return <div className="flex justify-center py-16"><div className="w-8 h-8 rounded-full border-2 border-[#6b8e23] border-t-transparent animate-spin" /></div>
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="gallery" data-vula-section="indigenousingredientgallery" data-vula-cms="gallery" className="py-20 bg-[#f4f5f2]">
|
||||||
|
<div className="max-w-6xl mx-auto px-4">
|
||||||
|
<div className="text-center mb-12">
|
||||||
|
<h2 className="text-3xl md:text-4xl font-bold text-[#2c331f]">
|
||||||
|
From harvest to <span className="text-[#6b8e23]">bottle</span>
|
||||||
|
</h2>
|
||||||
|
<p className="text-[#8b5a3c] mt-2 max-w-lg mx-auto">Every step, rooted in tradition and transparency.</p>
|
||||||
|
</div>
|
||||||
|
<div className="columns-1 md:columns-2 lg:columns-3 gap-6 space-y-6">
|
||||||
|
{items.slice(0, 6).map((item) => {
|
||||||
|
const d = item.data as { title?: string; description?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<div key={item.id} className="break-inside-avoid bg-white rounded-[28px] overflow-hidden shadow-lg hover:shadow-xl transition-all duration-200 group">
|
||||||
|
{d.image && (
|
||||||
|
<div className="relative w-full h-64 overflow-hidden">
|
||||||
|
<Image src={d.image} alt={d.title || 'Gallery image'} fill className="object-cover group-hover:scale-105 transition-transform duration-500" sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="p-5">
|
||||||
|
{d.title && <h3 className="font-semibold text-[#2c331f] text-lg mb-1">{d.title}</h3>}
|
||||||
|
{d.description && <p className="text-sm text-[#8b5a3c]/80">{d.description}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user