2021-09-03 22:41:02 +10:00

34 lines
645 B
Plaintext

{% extends "base" %} {% block content %}
<h1>Posts</h1>
{% if flash %}
<small class="field-{{ flash.0 }}-flash">
{{ flash.1 }}
</small>
{% endif %}
<table>
<tbody>
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Text</th>
</tr>
</thead>
{% for post in posts %}
<tr class="post" onclick="window.location='/{{ post.id }}';">
<td>{{ post.id }}</td>
<td>{{ post.title }}</td>
<td>{{ post.text }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="twelve columns">
<a href="/new">
<input type="button" value="add post" />
</a>
</div>
{% endblock content %}