Rocket/examples/todo/static/index.html

61 lines
1.9 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Rocket Todo Example</title>
<meta name="description" content="A todo application written in Rocket.">
<meta name="author" content="Sergio Benitez">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/skeleton.css">
<link rel="stylesheet" href="/css/style.css">
<link rel="icon" type="image/png" href="/images/favicon.png">
</head>
<body>
<div class="container">
<p><!--Nothing to see here --></p>
<div class="row">
<h4>Rocket Todo</h4>
<form action="/todo" method="post" accept-charset="utf-8">
<div class="ten columns">
<input type="text" placeholder="enter a task description..."
name="description" id="description" value="" autofocus
class="u-full-width {% if has_msg %}field-{{msg_type}}{% endif %}" />
{% if has_msg %}
<small class="field-{{msg_type}}-msg">
{{ msg }}
</small>
{% endif %}
</div>
<div class="two columns">
<input type="submit" value="add task">
</div>
</form>
</div>
<div class="row">
<div class="twelve columns">
<ul>
{% for task in tasks %}
{% if task.completed %}
<li>
<span class="completed">{{ task.description }}</span>
<a href="/todo/{{ task.id }}/toggle">undo</a>
<a href="/todo/{{ task.id }}/delete">delete</a>
</li>
{% else %}
<li>
<a href="/todo/{{ task.id }}/toggle">{{ task.description }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</body>
</html>