Mirrored from https://github.com/Camo67/OCIU-npo.git
Synced Nov 21, 07:15 UTC
fix/ociu-hero-navigation-20261109
| 1 | import { Navigation } from "@/components/Navigation"; |
| 2 | import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; |
| 3 | import { Badge } from "@/components/ui/badge"; |
| 4 | import { Calendar, User, ArrowRight } from "lucide-react"; |
| 5 | import { Button } from "@/components/ui/button"; |
| 6 | |
| 7 | const newsArticles = [ |
| 8 | { |
| 9 | id: 1, |
| 10 | title: "Community Unity Launches New Youth Development Program", |
| 11 | excerpt: "Empowering the next generation through mentorship and skills training initiatives across local communities.", |
| 12 | date: "2025-03-15", |
| 13 | author: "Cameron De Vries", |
| 14 | category: "Programs", |
| 15 | image: "https://images.unsplash.com/photo-1523240795612-9a054b0db644?w=800&auto=format&fit=crop" |
| 16 | }, |
| 17 | { |
| 18 | id: 2, |
| 19 | title: "Unspoken Truths Podcast Reaches 10,000 Listeners", |
| 20 | excerpt: "Celebrating a milestone in authentic conversations that matter, connecting communities through shared stories.", |
| 21 | date: "2025-03-10", |
| 22 | author: "Cameron De Vries", |
| 23 | category: "Podcast", |
| 24 | image: "https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=800&auto=format&fit=crop" |
| 25 | }, |
| 26 | { |
| 27 | id: 3, |
| 28 | title: "Digital Agency Partners with Local Businesses", |
| 29 | excerpt: "Supporting community growth through innovative digital solutions and strategic partnerships.", |
| 30 | date: "2025-03-05", |
| 31 | author: "Cameron De Vries", |
| 32 | category: "Business", |
| 33 | image: "https://images.unsplash.com/photo-1552664730-d307ca884978?w=800&auto=format&fit=crop" |
| 34 | } |
| 35 | ]; |
| 36 | |
| 37 | const CommunityNews = () => { |
| 38 | return ( |
| 39 | <div className="min-h-screen"> |
| 40 | <Navigation /> |
| 41 | <main className="pt-24 pb-16"> |
| 42 | <div className="container mx-auto px-4"> |
| 43 | {/* Hero Section */} |
| 44 | <div className="max-w-4xl mx-auto text-center mb-16 space-y-4 animate-fade-in"> |
| 45 | <h1 className="text-5xl md:text-6xl font-bold text-foreground"> |
| 46 | Community News |
| 47 | </h1> |
| 48 | <p className="text-xl text-muted-foreground"> |
| 49 | Stay informed about our latest initiatives, achievements, and community impact |
| 50 | </p> |
| 51 | </div> |
| 52 | |
| 53 | {/* News Grid */} |
| 54 | <div className="max-w-6xl mx-auto grid md:grid-cols-2 lg:grid-cols-3 gap-8"> |
| 55 | {newsArticles.map((article, index) => ( |
| 56 | <Card |
| 57 | key={article.id} |
| 58 | className="hover:shadow-xl transition-all animate-slide-up overflow-hidden" |
| 59 | style={{ animationDelay: `${index * 0.1}s` }} |
| 60 | > |
| 61 | <div className="w-full h-48 overflow-hidden"> |
| 62 | <img |
| 63 | src={article.image} |
| 64 | alt={article.title} |
| 65 | className="w-full h-full object-cover hover:scale-105 transition-transform duration-300" |
| 66 | /> |
| 67 | </div> |
| 68 | <CardHeader> |
| 69 | <div className="flex items-center gap-2 mb-2"> |
| 70 | <Badge variant="secondary">{article.category}</Badge> |
| 71 | </div> |
| 72 | <CardTitle className="text-xl line-clamp-2">{article.title}</CardTitle> |
| 73 | </CardHeader> |
| 74 | <CardContent className="space-y-4"> |
| 75 | <p className="text-muted-foreground line-clamp-3"> |
| 76 | {article.excerpt} |
| 77 | </p> |
| 78 | <div className="flex items-center justify-between text-sm text-muted-foreground"> |
| 79 | <div className="flex items-center gap-2"> |
| 80 | <Calendar className="w-4 h-4" /> |
| 81 | <span>{new Date(article.date).toLocaleDateString()}</span> |
| 82 | </div> |
| 83 | <div className="flex items-center gap-2"> |
| 84 | <User className="w-4 h-4" /> |
| 85 | <span>{article.author}</span> |
| 86 | </div> |
| 87 | </div> |
| 88 | <Button variant="outline" className="w-full group"> |
| 89 | Read More |
| 90 | <ArrowRight className="w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform" /> |
| 91 | </Button> |
| 92 | </CardContent> |
| 93 | </Card> |
| 94 | ))} |
| 95 | </div> |
| 96 | </div> |
| 97 | </main> |
| 98 | </div> |
| 99 | ); |
| 100 | }; |
| 101 | |
| 102 | export default CommunityNews; |