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.
53 lines
1.1 KiB
53 lines
1.1 KiB
<!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>
|
|
<nav>
|
|
<ul>
|
|
{%if parent%}
|
|
{%if parent[5]%}
|
|
<li><a href="/{{parent[5]}}">To Parent</a></li>
|
|
{%endif%}
|
|
<li><a href="/">To Index</a></li>
|
|
<li><a href="/{{parent[0]}}/edit">Edit</a></li>
|
|
{%endif%}
|
|
</ul>
|
|
</nav>
|
|
</section>
|
|
</body>
|
|
</html>
|