Deploy
This commit is contained in:
@@ -0,0 +1,72 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import Image from 'next/image'
|
||||||
|
import Link from 'next/link'
|
||||||
|
import Badge from '@/components/ui/Badge'
|
||||||
|
import { ArrowRight } from 'lucide-react'
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
|
||||||
|
export default function CulturalInsightsSection() {
|
||||||
|
const { items, loading } = useEmDashContent('posts')
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
// Take first 3 posts for this feed
|
||||||
|
const insights = items.slice(0, 3)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="cultural-insights" data-vula-section="culturalinsights" data-vula-cms="posts" className="py-20 bg-white">
|
||||||
|
<div className="container mx-auto px-4">
|
||||||
|
<h2 className="text-[2rem] font-display font-bold text-[#18181b] text-center mb-4">Cultural Insights</h2>
|
||||||
|
<p className="text-center text-[#211c0d] mb-12 max-w-2xl mx-auto font-serif italic">
|
||||||
|
Explore Venda traditions, local recipes, and travel tips from our team.
|
||||||
|
</p>
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||||
|
{insights.map((item) => {
|
||||||
|
const d = item.data as { title?: string; excerpt?: string; body?: string; author?: string; category?: string; image?: string }
|
||||||
|
return (
|
||||||
|
<article key={item.id} className="group rounded-2xl overflow-hidden shadow-[0_4px_20px_rgba(0,0,0,0.06)] hover:shadow-[0_8px_30px_rgba(0,0,0,0.12)] transition-all duration-300 border border-[#e2dfd4]">
|
||||||
|
<div className="relative h-48 overflow-hidden">
|
||||||
|
{d.image && (
|
||||||
|
<Image
|
||||||
|
src={d.image}
|
||||||
|
alt={d.title || ''}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 768px) 100vw, 33vw"
|
||||||
|
className="object-cover group-hover:scale-105 transition-transform duration-500"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="p-5">
|
||||||
|
{d.category && (
|
||||||
|
<Badge variant="outline" className="border-[#16a34a] text-[#16a34a] text-xs mb-2">
|
||||||
|
{d.category}
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
|
<h3 className="text-lg font-semibold text-[#18181b] mb-2">{d.title}</h3>
|
||||||
|
<p className="text-sm text-[#211c0d] font-serif italic leading-relaxed mb-4">
|
||||||
|
{d.excerpt?.substring(0, 120)}{d.excerpt && d.excerpt.length > 120 ? '...' : ''}
|
||||||
|
</p>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
{d.author && (
|
||||||
|
<span className="text-xs text-[#16a34a]">{d.author}</span>
|
||||||
|
)}
|
||||||
|
<button className="text-[#d4af37] text-sm font-medium flex items-center gap-1 group-hover:underline">
|
||||||
|
Read more <ArrowRight className="w-3 h-3" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user