Milestone 1.
This commit is contained in:
41
app/templates/notes/new.html
Normal file
41
app/templates/notes/new.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}New Note — PKM{% endblock %}
|
||||
{% block content %}
|
||||
<div class="max-w-3xl mx-auto">
|
||||
<h1 class="text-2xl font-semibold mb-4">New Note</h1>
|
||||
|
||||
{% if error %}
|
||||
<div class="alert alert-error mb-4">
|
||||
<span>{{ error }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{{ url_for('notes.notes_create') }}" class="space-y-4">
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Title</span>
|
||||
</label>
|
||||
<input name="title" value="{{ title or '' }}" class="input input-bordered" placeholder="Note title" required />
|
||||
</div>
|
||||
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Body (Markdown)</span>
|
||||
</label>
|
||||
<textarea name="body" rows="10" class="textarea textarea-bordered" placeholder="# Heading...">{{ body or '' }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Tags (comma-separated)</span>
|
||||
</label>
|
||||
<input name="tags" value="{{ tags_raw or '' }}" class="input input-bordered" placeholder="tag1, tag2" />
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<button class="btn btn-primary" type="submit">Create</button>
|
||||
<a class="btn btn-ghost" href="{{ url_for('notes.notes_index') }}">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user