Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Create Post | Django Bloggy Cruddy</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="https://unpkg.com/feather-icons"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#3B82F6', | |
| secondary: '#10B981' | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen"> | |
| <custom-navbar></custom-navbar> | |
| <main class="container mx-auto px-4 py-8"> | |
| <div class="max-w-3xl mx-auto"> | |
| <div class="flex items-center gap-2 mb-6"> | |
| <a href="/blog" class="text-primary hover:text-primary/80"> | |
| <i data-feather="arrow-left"></i> | |
| </a> | |
| <h1 class="text-2xl font-bold text-gray-800">Create New Post</h1> | |
| </div> | |
| <form class="bg-white rounded-xl shadow-md p-6"> | |
| <div class="mb-6"> | |
| <label for="title" class="block text-sm font-medium text-gray-700 mb-2">Title</label> | |
| <input type="text" id="title" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary"> | |
| </div> | |
| <div class="mb-6"> | |
| <label for="image" class="block text-sm font-medium text-gray-700 mb-2">Featured Image</label> | |
| <div class="flex items-center gap-4"> | |
| <div class="w-32 h-32 bg-gray-100 rounded-lg overflow-hidden"> | |
| <img id="image-preview" src="http://static.photos/technology/320x240/1" alt="Preview" class="w-full h-full object-cover"> | |
| </div> | |
| <div> | |
| <input type="file" id="image" class="hidden" accept="image/*"> | |
| <button type="button" onclick="document.getElementById('image').click()" class="bg-gray-100 hover:bg-gray-200 text-gray-700 px-4 py-2 rounded-lg transition duration-200"> | |
| <i data-feather="upload" class="mr-2"></i> Upload Image | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <label for="content" class="block text-sm font-medium text-gray-700 mb-2">Content</label> | |
| <textarea id="content" rows="10" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary"></textarea> | |
| </div> | |
| <div class="flex justify-end gap-4"> | |
| <a href="/blog" class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-6 py-2 rounded-lg transition duration-200"> | |
| Cancel | |
| </a> | |
| <button type="submit" class="bg-primary hover:bg-primary/90 text-white px-6 py-2 rounded-lg transition duration-200"> | |
| Publish Post | |
| </button> | |
| </div> | |
| </form> | |
| </div> | |
| </main> | |
| <custom-footer></custom-footer> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="script.js"></script> | |
| <script>feather.replace();</script> | |
| </body> | |
| </html> |