Spaces:
Running
Running
Download create-post.html from quanndm/postpilot-pro: direct link, hf CLI and curl.
- Browser
- Download file 4.17 kB
-
https://huggingface.co/spaces/quanndm/postpilot-pro/resolve/main/create-post.html
- Command line
-
hf download hf://spaces/quanndm/postpilot-pro/create-post.html
-
curl -L -o create-post.html https://huggingface.co/spaces/quanndm/postpilot-pro/resolve/main/create-post.html
4.17 kB
| <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> |