Deploy
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
'use client'
|
||||
|
||||
import { useEmDashContent } from '@/hooks/useEmDashContent'
|
||||
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from '@/components/ui/Card'
|
||||
import Badge from '@/components/ui/Badge'
|
||||
import { Heart, MessageCircle } from 'lucide-react'
|
||||
|
||||
export default function StreetCredFeedSection() {
|
||||
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-[#18181b] border-t-transparent animate-spin" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (items.length === 0) return null
|
||||
|
||||
return (
|
||||
<section
|
||||
id="street-cred"
|
||||
data-vula-section="streetcredfeed"
|
||||
data-vula-cms="posts"
|
||||
className="bg-[#ffffff] py-20 px-4"
|
||||
>
|
||||
<div className="max-w-7xl mx-auto">
|
||||
<h2 className="text-4xl md:text-5xl font-black text-[#18181b] mb-4 uppercase tracking-tight">
|
||||
Street Cred Feed
|
||||
</h2>
|
||||
<p className="text-lg text-[#36454F] mb-12 max-w-2xl">
|
||||
Real talk from the streets — what people are saying and wearing.
|
||||
</p>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{items.map((item) => {
|
||||
const d = item.data as {
|
||||
title?: string
|
||||
excerpt?: string
|
||||
body?: string
|
||||
author?: string
|
||||
category?: string
|
||||
image?: string
|
||||
}
|
||||
|
||||
return (
|
||||
<Card
|
||||
key={item.id}
|
||||
className="rounded-xl border border-neutral-200 bg-white shadow-[var(--shadow-card)] hover:shadow-[var(--shadow-lifted)] hover:-translate-y-1 transition-all duration-200 ease-out"
|
||||
>
|
||||
<CardHeader className="flex flex-row items-center gap-3 pb-2">
|
||||
{d.category && (
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="border-[#18181b] text-[#18181b] uppercase text-xs tracking-wider"
|
||||
>
|
||||
{d.category}
|
||||
</Badge>
|
||||
)}
|
||||
{d.author && (
|
||||
<span className="text-sm font-medium text-[#36454F]">
|
||||
@{d.author}
|
||||
</span>
|
||||
)}
|
||||
</CardHeader>
|
||||
|
||||
<CardContent>
|
||||
{d.title && (
|
||||
<CardTitle className="text-lg font-bold text-[#18181b] mb-2">
|
||||
{d.title}
|
||||
</CardTitle>
|
||||
)}
|
||||
{d.excerpt && (
|
||||
<p className="text-[#111827] text-base leading-relaxed mb-3 line-clamp-3">
|
||||
{d.excerpt}
|
||||
</p>
|
||||
)}
|
||||
{d.body && !d.excerpt && (
|
||||
<p className="text-[#111827] text-base leading-relaxed line-clamp-3">
|
||||
{d.body}
|
||||
</p>
|
||||
)}
|
||||
</CardContent>
|
||||
|
||||
<CardFooter className="flex items-center gap-4 pt-0 text-[#36454F]">
|
||||
<span className="flex items-center gap-1 text-sm">
|
||||
<Heart className="w-4 h-4" /> 24
|
||||
</span>
|
||||
<span className="flex items-center gap-1 text-sm">
|
||||
<MessageCircle className="w-4 h-4" /> 8
|
||||
</span>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user