You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
937 B

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
</head>
<body>
{%if parent%}
<section>
<h1>{{parent[1]}}</h1>
{{parent[2]}}
</section>
{%endif%}
<section>
<ul>
{%for (id, title, description, created_at, updated_at, parent_id) in cursor%}
<li>
<a href="/{{id}}">{{title}}</a>
<form method="POST" action="/{{id}}?_method=DELETE">
<input type="submit" value="DELETE" />
</form>
</li>
{%endfor%}
</ul>
</section>
<section>
<h2>Add Item</h2>
<form action="/" method="POST">
<input name="title" type="text">
<textarea name="description"></textarea>
{%if parent%}
<input type="hidden" name="parent_id" value="{{parent[0]}}"/>
{%endif%}
<input type="submit"/>
</form>
</section>
<section>
<a href="/">To Index</a>
</section>
</body>
</html>