tesses-webserver-cpp/wwwroot/index.twss

30 lines
730 B
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ToDo List</title>
</head>
<body>
<h1>ToDo List</h1>
<form method="POST" action="./cgi-bin/add-todo.twss">
<input type="text" name="text" placeholder="ToDo Text">
<input type="submit" value="Add">
</form>
<ul>
<!--tws
var i = 0;
lock();
each(global todos) {
-->
<li><!--tws print htmlencode(item); --> <a href="./cgi-bin/delete.twss?id=<!--tws print i; -->">x</a></li>
<!--tws
i+=1;
}
unlock();
-->
</ul>
</body>
</html>