Initial Commit
This commit is contained in:
19
templates/notes.html
Normal file
19
templates/notes.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends 'base.html' %}{% block title %}Notes — {{ brand }}{% endblock %}
|
||||
{% block content %}
|
||||
<form class="card glass p-4 max-w-2xl" method="post" action="/notes/add">
|
||||
<label class="block mb-2">Title<input class="w-full" name="name" required></label>
|
||||
<label>Note<textarea class="w-full" name="note" rows="4"></textarea></label>
|
||||
<div class="mt-3 text-right"><button class="btn bg-accent font-semibold">Save</button></div>
|
||||
</form>
|
||||
<div class="grid md:grid-cols-2 gap-4 mt-6">
|
||||
{% for n in notes %}
|
||||
<article class="card glass p-4">
|
||||
<div class="text-sm text-white/60">{{ (n.created_at|string)[:19].replace('T',' ') }}</div>
|
||||
<h3 class="font-semibold">{{ n.name }}</h3>
|
||||
<div class="mt-1 whitespace-pre-wrap text-white/90">{{ n.note }}</div>
|
||||
<form class="mt-3" method="post" action="/notes/{{n.slug}}/delete"><button class="btn text-xs">Delete</button></form>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user