Deploy
This commit is contained in:
@@ -0,0 +1,100 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import Button from '@/components/ui/Button'
|
||||||
|
|
||||||
|
export default function FieldNotesJournalSection() {
|
||||||
|
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 text-[#f5f5dc]" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section
|
||||||
|
id="field-notes"
|
||||||
|
data-vula-section="fieldnotesjournal"
|
||||||
|
data-vula-cms="posts"
|
||||||
|
className="py-24 bg-[#17170f]"
|
||||||
|
>
|
||||||
|
<div className="max-w-7xl mx-auto px-6">
|
||||||
|
{/* Eyebrow */}
|
||||||
|
<div className="flex items-center justify-center gap-4 mb-4">
|
||||||
|
<div className="w-14 h-px bg-[#f5f5dc]" />
|
||||||
|
<span className="text-[#6b8e23] font-sans uppercase tracking-[0.15em] text-sm">
|
||||||
|
Field Journal
|
||||||
|
</span>
|
||||||
|
<div className="w-14 h-px bg-[#f5f5dc]" />
|
||||||
|
</div>
|
||||||
|
<h2 className="text-4xl md:text-5xl font-light text-[#eeeee7] text-center mb-4 font-serif">
|
||||||
|
Notes from the Bush
|
||||||
|
</h2>
|
||||||
|
<p className="text-[#eeeee7]/80 text-center max-w-2xl mx-auto mb-12 font-sans text-sm leading-relaxed">
|
||||||
|
Rangers’ diaries, conservation updates, and the quiet stories of the reserve.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||||
|
{items.slice(0, 6).map((item) => {
|
||||||
|
const d = item.data as {
|
||||||
|
title?: string
|
||||||
|
excerpt?: string
|
||||||
|
author?: string
|
||||||
|
category?: string
|
||||||
|
image?: string
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={item.id}
|
||||||
|
className="group rounded-[8px] border border-white/10 overflow-hidden hover:border-[#f5f5dc]/30 transition-all duration-200"
|
||||||
|
>
|
||||||
|
<div className="relative aspect-video overflow-hidden">
|
||||||
|
{d.image && (
|
||||||
|
<Image
|
||||||
|
src={d.image}
|
||||||
|
alt={d.title ?? 'Journal post'}
|
||||||
|
fill
|
||||||
|
sizes="(max-width: 768px) 100vw, 33vw"
|
||||||
|
className="object-cover transition-transform duration-500 ease-out group-hover:scale-105"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="p-5">
|
||||||
|
<div className="flex items-center gap-2 mb-2">
|
||||||
|
{d.category && (
|
||||||
|
<span className="text-[#6b8e23] font-sans uppercase tracking-wider text-xs">
|
||||||
|
{d.category}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<h3 className="text-lg font-serif font-light text-[#eeeee7] mb-2">{d.title}</h3>
|
||||||
|
<p className="text-sm text-[#eeeee7]/70 mb-3 font-sans leading-relaxed line-clamp-3">
|
||||||
|
{d.excerpt}
|
||||||
|
</p>
|
||||||
|
{d.author && (
|
||||||
|
<p className="text-xs text-[#eeeee7]/50 font-sans">By {d.author}</p>
|
||||||
|
)}
|
||||||
|
<Button variant="outline" size="sm" className="mt-4">
|
||||||
|
Read More
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-12 text-center">
|
||||||
|
<Button variant="default" size="md" className="inline-flex items-center">
|
||||||
|
Read the Journal
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user