Deploy
This commit is contained in:
@@ -0,0 +1,48 @@
|
|||||||
|
'use client'
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import { Calendar, User } from 'lucide-react'
|
||||||
|
|
||||||
|
export default function LodgeJournalSection() {
|
||||||
|
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
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="lodge-journal" data-vula-section="lodgejournal" data-vula-cms="posts" className="py-24 bg-[#0f1712]">
|
||||||
|
<div className="max-w-7xl mx-auto px-4">
|
||||||
|
<div className="flex items-center justify-center gap-6 mb-16">
|
||||||
|
<span className="block w-14 h-px bg-[#d4af37]"></span>
|
||||||
|
<span className="text-[#d4af37] uppercase tracking-[0.2em] text-sm font-medium">Lodge Journal</span>
|
||||||
|
<span className="block w-14 h-px bg-[#d4af37]"></span>
|
||||||
|
</div>
|
||||||
|
<h2 className="text-4xl md:text-5xl font-light text-center mb-12 text-[#e7eeea]">
|
||||||
|
Stories from <span className="italic text-[#d4af37]">the Bush</span>
|
||||||
|
</h2>
|
||||||
|
<div className="space-y-10">
|
||||||
|
{items.slice(0, 4).map((item, index) => {
|
||||||
|
const d = item.data as { title?: string; excerpt?: string; author?: string; category?: string; image?: string }
|
||||||
|
const isReversed = index % 2 === 1
|
||||||
|
return (
|
||||||
|
<div key={item.id} className={`flex flex-col md:flex-row gap-8 items-center ${isReversed ? 'md:flex-row-reverse' : ''}`}>
|
||||||
|
<div className="w-full md:w-1/2 relative h-64 overflow-hidden rounded-md border border-[#304036]">
|
||||||
|
<Image src={d.image || ''} alt={d.title || ''} fill sizes="(max-width: 768px) 100vw, 50vw" className="object-cover hover:scale-105 transition-transform duration-500 ease-out" />
|
||||||
|
</div>
|
||||||
|
<div className="w-full md:w-1/2">
|
||||||
|
<span className="text-xs uppercase tracking-widest text-[#d4af37] font-medium">{d.category || 'Journal'}</span>
|
||||||
|
<h3 className="text-2xl font-semibold mt-2 mb-3 text-[#e7eeea]">{d.title}</h3>
|
||||||
|
<p className="text-[#a0b4a7] leading-relaxed mb-4">{d.excerpt}</p>
|
||||||
|
<div className="flex items-center gap-4 text-sm text-[#6b8c78]">
|
||||||
|
<span className="flex items-center gap-1"><User className="w-4 h-4" /> {d.author || 'Mpofana Team'}</span>
|
||||||
|
<span className="flex items-center gap-1"><Calendar className="w-4 h-4" /> Recently</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user