Spaces:
Running
Running
File size: 4,166 Bytes
62afa00 f64d54f 62afa00 f64d54f 62afa00 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | <!DOCTYPE html>
<html lang="en" class="h-full bg-gray-50">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create Post - PostPilot</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="components/navbar.js"></script>
<script src="components/sidebar.js"></script>
</head>
<body class="min-h-screen flex">
<custom-sidebar></custom-sidebar>
<div class="flex-1 flex flex-col ml-[250px]">
<custom-navbar></custom-navbar>
<main class="flex-1 p-8">
<div class="max-w-4xl mx-auto">
<h1 class="text-2xl font-bold text-gray-900 mb-6">Create New Post</h1>
<form id="postForm" class="space-y-6">
<div>
<label for="postTitle" class="block text-sm font-medium text-gray-700 mb-2">Post Title</label>
<input
type="text"
id="postTitle"
name="postTitle"
required
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
placeholder="Enter post title"
>
</div>
<div>
<label for="postContent" class="block text-sm font-medium text-gray-700 mb-2">Content</label>
<textarea
id="postContent"
name="postContent"
rows="10"
required
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
placeholder="Write your post content here..."
></textarea>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Featured Image</label>
<div class="flex items-center justify-center w-full">
<label for="postImage" class="flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 hover:bg-gray-100">
<div class="flex flex-col items-center justify-center pt-5 pb-6">
<i data-feather="upload" class="w-8 h-8 text-gray-500"></i>
<p class="text-sm text-gray-500 mt-2">Click to upload or drag and drop</p>
</div>
<input id="postImage" type="file" class="hidden" accept="image/*">
</label>
</div>
</div>
<div class="flex items-center space-x-4">
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-lg transition duration-200">
Publish
</button>
<button type="button" class="border border-gray-300 text-gray-700 py-2 px-6 rounded-lg transition duration-200 hover:bg-gray-50">
Save Draft
</button>
</div>
</form>
</div>
</main>
</div>
<script src="script.js"></script>
<script src="components/sidebar.js"></script>
<script>
feather.replace();
// Handle post form submission
document.getElementById('postForm').addEventListener('submit', function(e) {
e.preventDefault();
alert('Post created successfully!');
window.location.href = '/user-dashboard.html';
});
</script>
</body>
</html> |