2016-08-02 02:07:36 +00:00
|
|
|
<!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>
|
2016-09-25 09:26:15 +00:00
|
|
|
<form action="/todo" method="post">
|
2016-08-02 02:07:36 +00:00
|
|
|
<div class="ten columns">
|
|
|
|
<input type="text" placeholder="enter a task description..."
|
|
|
|
name="description" id="description" value="" autofocus
|
2016-09-22 11:12:07 +00:00
|
|
|
class="u-full-width {% if msg %}field-{{msg|first}}{% endif %}" />
|
|
|
|
{% if msg %}
|
|
|
|
<small class="field-{{msg|first}}-msg">
|
|
|
|
{{ msg | get(i=1) }}
|
2016-08-02 02:07:36 +00:00
|
|
|
</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>
|
2016-09-25 09:26:15 +00:00
|
|
|
<form class="inline" action="/todo/{{task.id}}" method="post">
|
|
|
|
<input type="hidden" name="_method" value="put" />
|
|
|
|
<button class="small" type="submit">undo</button>
|
|
|
|
</form>
|
|
|
|
<form class="inline" action="/todo/{{task.id}}" method="post">
|
|
|
|
<input type="hidden" name="_method" value="delete" />
|
|
|
|
<button class="primary small" type="submit">delete</button>
|
|
|
|
</form>
|
2016-08-02 02:07:36 +00:00
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li>
|
2016-09-25 09:26:15 +00:00
|
|
|
<form class="link" action="/todo/{{task.id}}" method="post">
|
|
|
|
<input type="hidden" name="_method" value="put" />
|
|
|
|
<button class="link" type="submit">{{ task.description }}</button>
|
|
|
|
</form>
|
2016-08-02 02:07:36 +00:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|