|
1 | | -import React from 'react'; |
2 | | -import { Users, MessageSquare, Share2, Heart } from 'lucide-react'; |
3 | | - |
4 | | -const POSTS = [ |
5 | | - { |
6 | | - id: 1, |
7 | | - user: 'AutoGeek99', |
8 | | - title: 'Custom DBC for Tesla Model 3', |
9 | | - content: 'I just reverse engineered some of the body control messages. Check out this DBC file!', |
10 | | - likes: 45, |
11 | | - comments: 12, |
12 | | - time: '2h ago' |
13 | | - }, |
14 | | - { |
15 | | - id: 2, |
16 | | - user: 'EmbeddedDev', |
17 | | - title: 'Scenario: Engine Overheat', |
18 | | - content: 'Created a new simulation scenario where the engine overheats if you idle too long. Great for testing warning indicators.', |
19 | | - likes: 32, |
20 | | - comments: 5, |
21 | | - time: '5h ago' |
22 | | - } |
23 | | -]; |
| 1 | +import { Github, ExternalLink, MessageSquare, Users, Lightbulb } from 'lucide-react'; |
24 | 2 |
|
25 | 3 | export const Community: React.FC = () => { |
26 | 4 | return ( |
27 | | - <div className="max-w-3xl mx-auto space-y-6"> |
28 | | - <div className="bg-gradient-to-r from-cyan-900/20 to-blue-900/20 rounded-xl p-8 text-center border border-cyan-500/20"> |
29 | | - <Users size={48} className="mx-auto text-cyan-400 mb-4" /> |
30 | | - <h2 className="text-2xl font-bold text-white mb-2">Join the Community</h2> |
31 | | - <p className="text-gray-400 mb-6">Share your DBC files, custom scenarios, and learn from other automotive engineers.</p> |
32 | | - <button className="px-6 py-2 bg-cyan-600 hover:bg-cyan-500 text-white font-bold rounded-lg transition-colors"> |
33 | | - Create Post |
34 | | - </button> |
35 | | - </div> |
| 5 | + <div className="flex items-center justify-center h-full"> |
| 6 | + <div className="max-w-2xl mx-auto text-center space-y-8"> |
| 7 | + {/* Main Card */} |
| 8 | + <div className="bg-gradient-to-br from-blue-50 to-cyan-50 border border-blue-200 rounded-xl p-12 shadow-lg"> |
| 9 | + <Github size={64} className="mx-auto text-gray-900 mb-6" /> |
| 10 | + <h2 className="text-4xl font-bold text-gray-900 mb-4">Join the Discussion</h2> |
| 11 | + <p className="text-gray-700 text-lg mb-8 max-w-xl mx-auto leading-relaxed"> |
| 12 | + Connect with other automotive engineers, share your projects, ask questions, and contribute to the AutoLearn community on GitHub Discussions. |
| 13 | + </p> |
| 14 | + <a |
| 15 | + href="https://github.com/Anant1711/AutoLearn/discussions/1" |
| 16 | + target="_blank" |
| 17 | + rel="noopener noreferrer" |
| 18 | + className="inline-flex items-center gap-3 px-8 py-4 bg-gray-900 hover:bg-gray-800 text-white font-bold rounded-lg transition-all shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" |
| 19 | + > |
| 20 | + <Github size={24} /> |
| 21 | + Open GitHub Discussions |
| 22 | + <ExternalLink size={18} /> |
| 23 | + </a> |
| 24 | + </div> |
36 | 25 |
|
37 | | - <div className="space-y-4"> |
38 | | - {POSTS.map((post) => ( |
39 | | - <div key={post.id} className="bg-gray-900 rounded-xl border border-gray-800 p-6"> |
40 | | - <div className="flex items-center gap-3 mb-4"> |
41 | | - <div className="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center text-white font-bold"> |
42 | | - {post.user[0]} |
43 | | - </div> |
44 | | - <div> |
45 | | - <div className="font-bold text-white">{post.user}</div> |
46 | | - <div className="text-xs text-gray-500">{post.time}</div> |
47 | | - </div> |
48 | | - </div> |
49 | | - <h3 className="text-lg font-bold text-white mb-2">{post.title}</h3> |
50 | | - <p className="text-gray-400 text-sm mb-4">{post.content}</p> |
51 | | - <div className="flex items-center gap-6 text-gray-500 text-sm"> |
52 | | - <button className="flex items-center gap-2 hover:text-red-400 transition-colors"> |
53 | | - <Heart size={16} /> {post.likes} |
54 | | - </button> |
55 | | - <button className="flex items-center gap-2 hover:text-blue-400 transition-colors"> |
56 | | - <MessageSquare size={16} /> {post.comments} |
57 | | - </button> |
58 | | - <button className="flex items-center gap-2 hover:text-white transition-colors"> |
59 | | - <Share2 size={16} /> Share |
60 | | - </button> |
61 | | - </div> |
| 26 | + {/* Feature Highlights */} |
| 27 | + <div className="grid grid-cols-1 md:grid-cols-3 gap-4"> |
| 28 | + <div className="bg-white border border-gray-200 rounded-lg p-6 shadow-sm"> |
| 29 | + <MessageSquare size={32} className="text-cyan-500 mb-3 mx-auto" /> |
| 30 | + <h3 className="font-bold text-gray-900 mb-2">Ask Questions</h3> |
| 31 | + <p className="text-sm text-gray-600">Get help from the community</p> |
| 32 | + </div> |
| 33 | + <div className="bg-white border border-gray-200 rounded-lg p-6 shadow-sm"> |
| 34 | + <Users size={32} className="text-blue-500 mb-3 mx-auto" /> |
| 35 | + <h3 className="font-bold text-gray-900 mb-2">Share Projects</h3> |
| 36 | + <p className="text-sm text-gray-600">Show off your DBC files</p> |
| 37 | + </div> |
| 38 | + <div className="bg-white border border-gray-200 rounded-lg p-6 shadow-sm"> |
| 39 | + <Lightbulb size={32} className="text-yellow-500 mb-3 mx-auto" /> |
| 40 | + <h3 className="font-bold text-gray-900 mb-2">Suggest Ideas</h3> |
| 41 | + <p className="text-sm text-gray-600">Help shape the future</p> |
62 | 42 | </div> |
63 | | - ))} |
| 43 | + </div> |
64 | 44 | </div> |
65 | 45 | </div> |
66 | 46 | ); |
|
0 commit comments