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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { useState, useEffect } from 'react';
|
| 2 |
+
import { Search, User, Calendar, Tag, Heart, MessageCircle, Share2, Filter, Plus, Globe, Users, TrendingUp } from 'lucide-react';
|
| 3 |
+
|
| 4 |
+
const App = () => {
|
| 5 |
+
const [posts, setPosts] = useState([]);
|
| 6 |
+
const [filteredPosts, setFilteredPosts] = useState([]);
|
| 7 |
+
const [searchTerm, setSearchTerm] = useState('');
|
| 8 |
+
const [selectedCategory, setSelectedCategory] = useState('all');
|
| 9 |
+
const [showCreateModal, setShowCreateModal] = useState(false);
|
| 10 |
+
|
| 11 |
+
// Mock data for guest posts
|
| 12 |
+
const mockPosts = [
|
| 13 |
+
{
|
| 14 |
+
id: 1,
|
| 15 |
+
title: "The Future of Sustainable Web Development",
|
| 16 |
+
author: "Sarah Chen",
|
| 17 |
+
authorAvatar: "https://placehold.co/40x40/6366f1/white?text=SC",
|
| 18 |
+
category: "Technology",
|
| 19 |
+
tags: ["Web Dev", "Sustainability", "Green Tech"],
|
| 20 |
+
excerpt: "Exploring how developers can build more environmentally conscious websites and applications in 2024.",
|
| 21 |
+
likes: 24,
|
| 22 |
+
comments: 8,
|
| 23 |
+
date: "2024-01-15",
|
| 24 |
+
readTime: "5 min read",
|
| 25 |
+
featured: true
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
id: 2,
|
| 29 |
+
title: "Mindfulness Practices for Remote Teams",
|
| 30 |
+
author: "Marcus Johnson",
|
| 31 |
+
authorAvatar: "https://placehold.co/40x40/10b981/white?text=MJ",
|
| 32 |
+
category: "Lifestyle",
|
| 33 |
+
tags: ["Remote Work", "Wellness", "Team Building"],
|
| 34 |
+
excerpt: "Simple mindfulness techniques that can transform your remote work experience and boost team productivity.",
|
| 35 |
+
likes: 18,
|
| 36 |
+
comments: 12,
|
| 37 |
+
date: "2024-01-12",
|
| 38 |
+
readTime: "4 min read",
|
| 39 |
+
featured: false
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
id: 3,
|
| 43 |
+
title: "The Art of Storytelling in Digital Marketing",
|
| 44 |
+
author: "Elena Rodriguez",
|
| 45 |
+
authorAvatar: "https://placehold.co/40x40/f59e0b/white?text=ER",
|
| 46 |
+
category: "Marketing",
|
| 47 |
+
tags: ["Storytelling", "Content Marketing", "Brand Building"],
|
| 48 |
+
excerpt: "How to craft compelling narratives that resonate with your audience and drive engagement.",
|
| 49 |
+
likes: 31,
|
| 50 |
+
comments: 15,
|
| 51 |
+
date: "2024-01-10",
|
| 52 |
+
readTime: "6 min read",
|
| 53 |
+
featured: true
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
id: 4,
|
| 57 |
+
title: "Building Resilient Microservices Architecture",
|
| 58 |
+
author: "David Kim",
|
| 59 |
+
authorAvatar: "https://placehold.co/40x40/ef4444/white?text=DK",
|
| 60 |
+
category: "Technology",
|
| 61 |
+
tags: ["Microservices", "Architecture", "DevOps"],
|
| 62 |
+
excerpt: "Key principles and best practices for designing scalable and fault-tolerant microservices systems.",
|
| 63 |
+
likes: 27,
|
| 64 |
+
comments: 9,
|
| 65 |
+
date: "2024-01-08",
|
| 66 |
+
readTime: "8 min read",
|
| 67 |
+
featured: false
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
id: 5,
|
| 71 |
+
title: "The Psychology of Color in Brand Design",
|
| 72 |
+
author: "Amira Hassan",
|
| 73 |
+
authorAvatar: "https://placehold.co/40x40/8b5cf6/white?text=AH",
|
| 74 |
+
category: "Design",
|
| 75 |
+
tags: ["Color Theory", "Branding", "Psychology"],
|
| 76 |
+
excerpt: "Understanding how color choices impact consumer behavior and brand perception in digital spaces.",
|
| 77 |
+
likes: 22,
|
| 78 |
+
comments: 7,
|
| 79 |
+
date: "2024-01-05",
|
| 80 |
+
readTime: "5 min read",
|
| 81 |
+
featured: false
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
id: 6,
|
| 85 |
+
title: "Financial Literacy for Young Entrepreneurs",
|
| 86 |
+
author: "James Wilson",
|
| 87 |
+
authorAvatar: "https://placehold.co/40x40/06b6d4/white?text=JW",
|
| 88 |
+
category: "Business",
|
| 89 |
+
tags: ["Finance", "Entrepreneurship", "Investing"],
|
| 90 |
+
excerpt: "Essential financial concepts every young business owner should master to build sustainable ventures.",
|
| 91 |
+
likes: 19,
|
| 92 |
+
comments: 11,
|
| 93 |
+
date: "2024-01-03",
|
| 94 |
+
readTime: "7 min read",
|
| 95 |
+
featured: false
|
| 96 |
+
}
|
| 97 |
+
];
|
| 98 |
+
|
| 99 |
+
const categories = [
|
| 100 |
+
{ id: 'all', name: 'All Categories', icon: Globe },
|
| 101 |
+
{ id: 'technology', name: 'Technology', icon: TrendingUp },
|
| 102 |
+
{ id: 'design', name: 'Design', icon: TrendingUp },
|
| 103 |
+
{ id: 'marketing', name: 'Marketing', icon: TrendingUp },
|
| 104 |
+
{ id: 'business', name: 'Business', icon: TrendingUp },
|
| 105 |
+
{ id: 'lifestyle', name: 'Lifestyle', icon: TrendingUp }
|
| 106 |
+
];
|
| 107 |
+
|
| 108 |
+
useEffect(() => {
|
| 109 |
+
setPosts(mockPosts);
|
| 110 |
+
setFilteredPosts(mockPosts);
|
| 111 |
+
}, []);
|
| 112 |
+
|
| 113 |
+
useEffect(() => {
|
| 114 |
+
let filtered = posts;
|
| 115 |
+
|
| 116 |
+
if (searchTerm) {
|
| 117 |
+
filtered = filtered.filter(post =>
|
| 118 |
+
post.title.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
| 119 |
+
post.excerpt.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
| 120 |
+
post.tags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase()))
|
| 121 |
+
);
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
if (selectedCategory !== 'all') {
|
| 125 |
+
filtered = filtered.filter(post =>
|
| 126 |
+
post.category.toLowerCase() === selectedCategory.toLowerCase()
|
| 127 |
+
);
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
setFilteredPosts(filtered);
|
| 131 |
+
}, [searchTerm, selectedCategory, posts]);
|
| 132 |
+
|
| 133 |
+
const handleLike = (postId) => {
|
| 134 |
+
setPosts(posts.map(post =>
|
| 135 |
+
post.id === postId
|
| 136 |
+
? { ...post, likes: post.likes + 1 }
|
| 137 |
+
: post
|
| 138 |
+
));
|
| 139 |
+
};
|
| 140 |
+
|
| 141 |
+
const CreatePostModal = () => (
|
| 142 |
+
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
|
| 143 |
+
<div className="bg-white rounded-2xl max-w-2xl w-full max-h-screen overflow-y-auto">
|
| 144 |
+
<div className="p-6">
|
| 145 |
+
<div className="flex justify-between items-center mb-6">
|
| 146 |
+
<h2 className="text-2xl font-bold text-gray-900">Create Guest Post</h2>
|
| 147 |
+
<button
|
| 148 |
+
onClick={() => setShowCreateModal(false)}
|
| 149 |
+
className="text-gray-400 hover:text-gray-600 text-2xl"
|
| 150 |
+
>
|
| 151 |
+
×
|
| 152 |
+
</button>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<form className="space-y-6">
|
| 156 |
+
<div>
|
| 157 |
+
<label className="block text-sm font-medium text-gray-700 mb-2">Post Title</label>
|
| 158 |
+
<input
|
| 159 |
+
type="text"
|
| 160 |
+
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
| 161 |
+
placeholder="Enter your post title"
|
| 162 |
+
/>
|
| 163 |
+
</div>
|
| 164 |
+
|
| 165 |
+
<div>
|
| 166 |
+
<label className="block text-sm font-medium text-gray-700 mb-2">Category</label>
|
| 167 |
+
<select className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
|
| 168 |
+
<option>Select a category</option>
|
| 169 |
+
<option>Technology</option>
|
| 170 |
+
<option>Design</option>
|
| 171 |
+
<option>Marketing</option>
|
| 172 |
+
<option>Business</option>
|
| 173 |
+
<option>Lifestyle</option>
|
| 174 |
+
</select>
|
| 175 |
+
</div>
|
| 176 |
+
|
| 177 |
+
<div>
|
| 178 |
+
<label className="block text-sm font-medium text-gray-700 mb-2">Tags</label>
|
| 179 |
+
<input
|
| 180 |
+
type="text"
|
| 181 |
+
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
| 182 |
+
placeholder="Enter tags separated by commas"
|
| 183 |
+
/>
|
| 184 |
+
</div>
|
| 185 |
+
|
| 186 |
+
<div>
|
| 187 |
+
<label className="block text-sm font-medium text-gray-700 mb-2">Excerpt</label>
|
| 188 |
+
<textarea
|
| 189 |
+
rows="3"
|
| 190 |
+
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
| 191 |
+
placeholder="Brief summary of your post"
|
| 192 |
+
></textarea>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div>
|
| 196 |
+
<label className="block text-sm font-medium text-gray-700 mb-2">Full Content</label>
|
| 197 |
+
<textarea
|
| 198 |
+
rows="8"
|
| 199 |
+
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
| 200 |
+
placeholder="Write your full guest post content here..."
|
| 201 |
+
></textarea>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
<div className="flex gap-4 pt-4">
|
| 205 |
+
<button
|
| 206 |
+
type="button"
|
| 207 |
+
onClick={() => setShowCreateModal(false)}
|
| 208 |
+
className="flex-1 px-6 py-3 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors"
|
| 209 |
+
>
|
| 210 |
+
Cancel
|
| 211 |
+
</button>
|
| 212 |
+
<button
|
| 213 |
+
type="submit"
|
| 214 |
+
className="flex-1 px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors"
|
| 215 |
+
>
|
| 216 |
+
Submit for Review
|
| 217 |
+
</button>
|
| 218 |
+
</div>
|
| 219 |
+
</form>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
</div>
|
| 223 |
+
);
|
| 224 |
+
|
| 225 |
+
return (
|
| 226 |
+
<div className="min-h-screen bg-gray-50">
|
| 227 |
+
{/* Header */}
|
| 228 |
+
<header className="bg-white shadow-sm border-b">
|
| 229 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 230 |
+
<div className="flex justify-between items-center h-16">
|
| 231 |
+
<div className="flex items-center">
|
| 232 |
+
<div className="flex-shrink-0">
|
| 233 |
+
<h1 className="text-2xl font-bold text-indigo-600">GuestPostHub</h1>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
<nav className="hidden md:flex space-x-8">
|
| 237 |
+
<a href="#" className="text-gray-900 hover:text-indigo-600 font-medium">Browse</a>
|
| 238 |
+
<a href="#" className="text-gray-500 hover:text-indigo-600 font-medium">My Posts</a>
|
| 239 |
+
<a href="#" className="text-gray-500 hover:text-indigo-600 font-medium">Community</a>
|
| 240 |
+
</nav>
|
| 241 |
+
<div className="flex items-center space-x-4">
|
| 242 |
+
<button className="p-2 text-gray-400 hover:text-gray-600">
|
| 243 |
+
<User className="h-6 w-6" />
|
| 244 |
+
</button>
|
| 245 |
+
<button
|
| 246 |
+
onClick={() => setShowCreateModal(true)}
|
| 247 |
+
className="bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 transition-colors flex items-center space-x-2"
|
| 248 |
+
>
|
| 249 |
+
<Plus className="h-4 w-4" />
|
| 250 |
+
<span>Create Post</span>
|
| 251 |
+
</button>
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
</div>
|
| 255 |
+
</header>
|
| 256 |
+
|
| 257 |
+
{/* Hero Section */}
|
| 258 |
+
<section className="bg-gradient-to-r from-indigo-600 to-purple-600 text-white py-16">
|
| 259 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
|
| 260 |
+
<h1 className="text-4xl md:text-6xl font-bold mb-6">Share Your Voice, Expand Your Reach</h1>
|
| 261 |
+
<p className="text-xl md:text-2xl mb-8 text-indigo-100">Connect with publishers and writers for quality guest post exchanges</p>
|
| 262 |
+
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
| 263 |
+
<button className="bg-white text-indigo-600 px-8 py-3 rounded-lg font-semibold hover:bg-gray-100 transition-colors">
|
| 264 |
+
Find Guest Posts
|
| 265 |
+
</button>
|
| 266 |
+
<button
|
| 267 |
+
onClick={() => setShowCreateModal(true)}
|
| 268 |
+
className="border-2 border-white text-white px-8 py-3 rounded-lg font-semibold hover:bg-white hover:text-indigo-600 transition-colors"
|
| 269 |
+
>
|
| 270 |
+
Submit Your Post
|
| 271 |
+
</button>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
</section>
|
| 275 |
+
|
| 276 |
+
{/* Stats Section */}
|
| 277 |
+
<section className="py-12 bg-white">
|
| 278 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 279 |
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-8 text-center">
|
| 280 |
+
<div className="p-6">
|
| 281 |
+
<div className="flex justify-center mb-4">
|
| 282 |
+
<Globe className="h-12 w-12 text-indigo-600" />
|
| 283 |
+
</div>
|
| 284 |
+
<h3 className="text-3xl font-bold text-gray-900 mb-2">10K+</h3>
|
| 285 |
+
<p className="text-gray-600">Active Publishers</p>
|
| 286 |
+
</div>
|
| 287 |
+
<div className="p-6">
|
| 288 |
+
<div className="flex justify-center mb-4">
|
| 289 |
+
<Users className="h-12 w-12 text-indigo-600" />
|
| 290 |
+
</div>
|
| 291 |
+
<h3 className="text-3xl font-bold text-gray-900 mb-2">50K+</h3>
|
| 292 |
+
<p className="text-gray-600">Writers Community</p>
|
| 293 |
+
</div>
|
| 294 |
+
<div className="p-6">
|
| 295 |
+
<div className="flex justify-center mb-4">
|
| 296 |
+
<TrendingUp className="h-12 w-12 text-indigo-600" />
|
| 297 |
+
</div>
|
| 298 |
+
<h3 className="text-3xl font-bold text-gray-900 mb-2">100K+</h3>
|
| 299 |
+
<p className="text-gray-600">Posts Published</p>
|
| 300 |
+
</div>
|
| 301 |
+
</div>
|
| 302 |
+
</div>
|
| 303 |
+
</section>
|
| 304 |
+
|
| 305 |
+
{/* Main Content */}
|
| 306 |
+
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
| 307 |
+
{/* Search and Filter Bar */}
|
| 308 |
+
<div className="mb-8">
|
| 309 |
+
<div className="flex flex-col lg:flex-row gap-4 items-center justify-between">
|
| 310 |
+
<div className="relative flex-1 max-w-2xl">
|
| 311 |
+
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5" />
|
| 312 |
+
<input
|
| 313 |
+
type="text"
|
| 314 |
+
placeholder="Search guest posts, topics, or authors..."
|
| 315 |
+
className="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
| 316 |
+
value={searchTerm}
|
| 317 |
+
onChange={(e) => setSearchTerm(e.target.value)}
|
| 318 |
+
/>
|
| 319 |
+
</div>
|
| 320 |
+
<div className="flex items-center space-x-4">
|
| 321 |
+
<Filter className="h-5 w-5 text-gray-400" />
|
| 322 |
+
<select
|
| 323 |
+
className="px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent"
|
| 324 |
+
value={selectedCategory}
|
| 325 |
+
onChange={(e) => setSelectedCategory(e.target.value)}
|
| 326 |
+
>
|
| 327 |
+
{categories.map(category => (
|
| 328 |
+
<option key={category.id} value={category.id}>{category.name}</option>
|
| 329 |
+
))}
|
| 330 |
+
</select>
|
| 331 |
+
</div>
|
| 332 |
+
</div>
|
| 333 |
+
</div>
|
| 334 |
+
|
| 335 |
+
{/* Categories */}
|
| 336 |
+
<div className="mb-8">
|
| 337 |
+
<div className="flex flex-wrap gap-3">
|
| 338 |
+
{categories.map(category => {
|
| 339 |
+
const IconComponent = category.icon;
|
| 340 |
+
return (
|
| 341 |
+
<button
|
| 342 |
+
key={category.id}
|
| 343 |
+
onClick={() => setSelectedCategory(category.id)}
|
| 344 |
+
className={`flex items-center space-x-2 px-4 py-2 rounded-full transition-colors ${
|
| 345 |
+
selectedCategory === category.id
|
| 346 |
+
? 'bg-indigo-600 text-white'
|
| 347 |
+
: 'bg-white text-gray-700 hover:bg-gray-100 border border-gray-300'
|
| 348 |
+
}`}
|
| 349 |
+
>
|
| 350 |
+
<IconComponent className="h-4 w-4" />
|
| 351 |
+
<span>{category.name}</span>
|
| 352 |
+
</button>
|
| 353 |
+
);
|
| 354 |
+
})}
|
| 355 |
+
</div>
|
| 356 |
+
</div>
|
| 357 |
+
|
| 358 |
+
{/* Featured Posts */}
|
| 359 |
+
<section className="mb-12">
|
| 360 |
+
<h2 className="text-2xl font-bold text-gray-900 mb-6">Featured Guest Posts</h2>
|
| 361 |
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
| 362 |
+
{filteredPosts.filter(post => post.featured).map(post => (
|
| 363 |
+
<div key={post.id} className="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden hover:shadow-md transition-shadow">
|
| 364 |
+
<div className="p-6">
|
| 365 |
+
<div className="flex items-center justify-between mb-4">
|
| 366 |
+
<span className="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-indigo-100 text-indigo-800">
|
| 367 |
+
{post.category}
|
| 368 |
+
</span>
|
| 369 |
+
<span className="text-sm text-gray-500">{post.readTime}</span>
|
| 370 |
+
</div>
|
| 371 |
+
<h3 className="text-xl font-bold text-gray-900 mb-3">{post.title}</h3>
|
| 372 |
+
<p className="text-gray-600 mb-4">{post.excerpt}</p>
|
| 373 |
+
<div className="flex flex-wrap gap-2 mb-4">
|
| 374 |
+
{post.tags.map(tag => (
|
| 375 |
+
<span key={tag} className="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-gray-100 text-gray-800">
|
| 376 |
+
<Tag className="h-3 w-3 mr-1" />
|
| 377 |
+
{tag}
|
| 378 |
+
</span>
|
| 379 |
+
))}
|
| 380 |
+
</div>
|
| 381 |
+
<div className="flex items-center justify-between">
|
| 382 |
+
<div className="flex items-center space-x-3">
|
| 383 |
+
<img
|
| 384 |
+
src={post.authorAvatar}
|
| 385 |
+
alt={post.author}
|
| 386 |
+
className="h-10 w-10 rounded-full"
|
| 387 |
+
/>
|
| 388 |
+
<div>
|
| 389 |
+
<p className="text-sm font-medium text-gray-900">{post.author}</p>
|
| 390 |
+
<p className="text-sm text-gray-500">{new Date(post.date).toLocaleDateString()}</p>
|
| 391 |
+
</div>
|
| 392 |
+
</div>
|
| 393 |
+
<div className="flex items-center space-x-4">
|
| 394 |
+
<button
|
| 395 |
+
onClick={() => handleLike(post.id)}
|
| 396 |
+
className="flex items-center space-x-1 text-gray-500 hover:text-red-500 transition-colors"
|
| 397 |
+
>
|
| 398 |
+
<Heart className="h-5 w-5" />
|
| 399 |
+
<span className="text-sm">{post.likes}</span>
|
| 400 |
+
</button>
|
| 401 |
+
<button className="flex items-center space-x-1 text-gray-500 hover:text-indigo-600 transition-colors">
|
| 402 |
+
<MessageCircle className="h-5 w-5" />
|
| 403 |
+
<span className="text-sm">{post.comments}</span>
|
| 404 |
+
</button>
|
| 405 |
+
<button className="text-gray-500 hover:text-indigo-600 transition-colors">
|
| 406 |
+
<Share2 className="h-5 w-5" />
|
| 407 |
+
</button>
|
| 408 |
+
</div>
|
| 409 |
+
</div>
|
| 410 |
+
</div>
|
| 411 |
+
</div>
|
| 412 |
+
))}
|
| 413 |
+
</div>
|
| 414 |
+
</section>
|
| 415 |
+
|
| 416 |
+
{/* All Posts */}
|
| 417 |
+
<section>
|
| 418 |
+
<h2 className="text-2xl font-bold text-gray-900 mb-6">All Guest Posts</h2>
|
| 419 |
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 420 |
+
{filteredPosts.map(post => (
|
| 421 |
+
<div key={post.id} className="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden hover:shadow-md transition-shadow">
|
| 422 |
+
<div className="p-5">
|
| 423 |
+
<div className="flex items-center justify-between mb-3">
|
| 424 |
+
<span className="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-gray-100 text-gray-800">
|
| 425 |
+
{post.category}
|
| 426 |
+
</span>
|
| 427 |
+
<span className="text-xs text-gray-500">{post.readTime}</span>
|
| 428 |
+
</div>
|
| 429 |
+
<h3 className="text-lg font-semibold text-gray-900 mb-2 line-clamp-2">{post.title}</h3>
|
| 430 |
+
<p className="text-gray-600 text-sm mb-3 line-clamp-2">{post.excerpt}</p>
|
| 431 |
+
<div className="flex flex-wrap gap-1 mb-4">
|
| 432 |
+
{post.tags.slice(0, 2).map(tag => (
|
| 433 |
+
<span key={tag} className="inline-flex items-center px-2 py-1 rounded text-xs bg-gray-50 text-gray-600">
|
| 434 |
+
{tag}
|
| 435 |
+
</span>
|
| 436 |
+
))}
|
| 437 |
+
{post.tags.length > 2 && (
|
| 438 |
+
<span className="text-xs text-gray-500">+{post.tags.length - 2}</span>
|
| 439 |
+
)}
|
| 440 |
+
</div>
|
| 441 |
+
<div className="flex items-center justify-between">
|
| 442 |
+
<div className="flex items-center space-x-2">
|
| 443 |
+
<img
|
| 444 |
+
src={post.authorAvatar}
|
| 445 |
+
alt={post.author}
|
| 446 |
+
className="h-8 w-8 rounded-full"
|
| 447 |
+
/>
|
| 448 |
+
<div>
|
| 449 |
+
<p className="text-sm font-medium text-gray-900">{post.author}</p>
|
| 450 |
+
<p className="text-xs text-gray-500">{new Date(post.date).toLocaleDateString()}</p>
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
<div className="flex items-center space-x-2">
|
| 454 |
+
<button
|
| 455 |
+
onClick={() => handleLike(post.id)}
|
| 456 |
+
className="flex items-center space-x-1 text-gray-500 hover:text-red-500 transition-colors"
|
| 457 |
+
>
|
| 458 |
+
<Heart className="h-4 w-4" />
|
| 459 |
+
<span className="text-xs">{post.likes}</span>
|
| 460 |
+
</button>
|
| 461 |
+
<button className="flex items-center space-x-1 text-gray-500 hover:text-indigo-600 transition-colors">
|
| 462 |
+
<MessageCircle className="h-4 w-4" />
|
| 463 |
+
<span className="text-xs">{post.comments}</span>
|
| 464 |
+
</button>
|
| 465 |
+
</div>
|
| 466 |
+
</div>
|
| 467 |
+
</div>
|
| 468 |
+
</div>
|
| 469 |
+
))}
|
| 470 |
+
</div>
|
| 471 |
+
</section>
|
| 472 |
+
|
| 473 |
+
{filteredPosts.length === 0 && (
|
| 474 |
+
<div className="text-center py-12">
|
| 475 |
+
<p className="text-gray-500 text-lg">No guest posts found matching your criteria.</p>
|
| 476 |
+
</div>
|
| 477 |
+
)}
|
| 478 |
+
</main>
|
| 479 |
+
|
| 480 |
+
{/* Footer */}
|
| 481 |
+
<footer className="bg-gray-900 text-white py-12">
|
| 482 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 483 |
+
<div className="grid grid-cols-1 md:grid-cols-4 gap-8">
|
| 484 |
+
<div>
|
| 485 |
+
<h3 className="text-xl font-bold mb-4">GuestPostHub</h3>
|
| 486 |
+
<p className="text-gray-400">Connecting writers and publishers for quality guest post exchanges.</p>
|
| 487 |
+
</div>
|
| 488 |
+
<div>
|
| 489 |
+
<h4 className="font-semibold mb-4">For Writers</h4>
|
| 490 |
+
<ul className="space-y-2 text-gray-400">
|
| 491 |
+
<li><a href="#" className="hover:text-white transition-colors">Submit Posts</a></li>
|
| 492 |
+
<li><a href="#" className="hover:text-white transition-colors">Find Publishers</a></li>
|
| 493 |
+
<li><a href="#" className="hover:text-white transition-colors">Writing Tips</a></li>
|
| 494 |
+
</ul>
|
| 495 |
+
</div>
|
| 496 |
+
<div>
|
| 497 |
+
<h4 className="font-semibold mb-4">For Publishers</h4>
|
| 498 |
+
<ul className="space-y-2 text-gray-400">
|
| 499 |
+
<li><a href="#" className="hover:text-white transition-colors">Post Opportunities</a></li>
|
| 500 |
+
<li><a href="#" className="hover:text-white transition-colors">Find Writers</a></li>
|
| 501 |
+
<li><a href="#" className="hover:text-white transition-colors">Publishing Guide</a></li>
|
| 502 |
+
</ul>
|
| 503 |
+
</div>
|
| 504 |
+
<div>
|
| 505 |
+
<h4 className="font-semibold mb-4">Support</h4>
|
| 506 |
+
<ul className="space-y-2 text-gray-400">
|
| 507 |
+
<li><a href="#" className="hover:text-white transition-colors">Help Center</a></li>
|
| 508 |
+
<li><a href="#" className="hover:text-white transition-colors">Community</a></li>
|
| 509 |
+
<li><a href="#" className="hover:text-white transition-colors">Contact Us</a></li>
|
| 510 |
+
</ul>
|
| 511 |
+
</div>
|
| 512 |
+
</div>
|
| 513 |
+
<div className="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
|
| 514 |
+
<p>© 2024 GuestPostHub. All rights reserved.</p>
|
| 515 |
+
</div>
|
| 516 |
+
</div>
|
| 517 |
+
</footer>
|
| 518 |
+
|
| 519 |
+
{/* Create Post Modal */}
|
| 520 |
+
{showCreateModal && <CreatePostModal />}
|
| 521 |
+
</div>
|
| 522 |
+
);
|
| 523 |
+
};
|
| 524 |
+
|
| 525 |
+
export default App;
|