First Commit
This commit is contained in:
78
templates/new_project.html
Normal file
78
templates/new_project.html
Normal file
@@ -0,0 +1,78 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}New Project Post{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<section class="py-20 bg-gradient-to-br from-red-800 to-orange-400 text-white text-center">
|
||||
<h1 class="text-5xl font-extrabold mb-2">Create a New Project Post</h1>
|
||||
<p class="text-lg">Share your projects with the world.</p>
|
||||
</section>
|
||||
|
||||
<section class="py-16 bg-black text-white">
|
||||
<div class="max-w-3xl mx-auto px-6">
|
||||
<form action="{{ url_for('new_project') }}" method="post" enctype="multipart/form-data" class="space-y-6">
|
||||
|
||||
|
||||
<div>
|
||||
<label for="title" class="block font-semibold mb-1">Post Title</label>
|
||||
<input type="text" id="title" name="title" required
|
||||
class="text-black w-full border border-gray-300 rounded px-4 py-2 focus:ring-2 focus:ring-orange-400 focus:outline-none">
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<label for="content" class="block font-semibold mb-1">Post Content</label>
|
||||
<textarea id="content" name="content" required rows="6"
|
||||
class="text-black w-full border border-gray-300 rounded px-4 py-2 focus:ring-2 focus:ring-orange-400 focus:outline-none resize-none"></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<label for="category" class="block font-semibold mb-1">Category</label>
|
||||
<input type="text" id="category" name="category" placeholder="What's This Post About?"
|
||||
class="text-black w-full border border-gray-300 rounded px-4 py-2 focus:ring-2 focus:ring-orange-400 focus:outline-none">
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<label for="tags" class="block font-semibold mb-1">Tags (comma-separated)</label>
|
||||
<input type="text" id="tags" name="tags" placeholder="e.g., Flask, SQLite, API"
|
||||
class="text-black w-full border border-gray-300 rounded px-4 py-2 focus:ring-2 focus:ring-orange-400 focus:outline-none">
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<label for="images" class="block font-semibold mb-1">Upload Images</label>
|
||||
<input type="file" name="images" id="images" multiple
|
||||
class="text-black w-full border border-gray-300 rounded px-3 py-2 text-gray-700 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:bg-orange-600 file:text-white hover:file:bg-orange-700">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="pt-4">
|
||||
<button type="submit"
|
||||
class="bg-orange-600 text-white px-6 py-2 rounded hover:bg-orange-700 transition">
|
||||
Submit Post
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="mt-8 text-center">
|
||||
<a href="{{ url_for('blog') }}" class="text-blue-600 hover:underline">← Back to Blog</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Textarea autoresize -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const textarea = document.getElementById('content');
|
||||
textarea.addEventListener('input', function () {
|
||||
this.style.height = 'auto';
|
||||
this.style.height = this.scrollHeight + 'px';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user