1 <!-- extend base layout -->
2 {% extends
"base.html" %}
5 <h1>Hi, {{ g.user.nickname }}!
</h1>
6 {% include 'flash.html' %}
8 <form class=
"form-horizontal" action=
"" method=
"post" name=
"post">
9 {{ form.hidden_tag() }}
10 <div class=
"control-group{% if form.post.errors %} error{% endif %}">
11 <label class=
"control-label" for=
"post">Say something:
</label>
12 <div class=
"controls">
13 {{ form.post(size=
30, maxlength=
140) }}
14 {% for error in form.errors.post %}
15 <span class=
"help-inline">[{{ error }}]
</span><br>
19 <div class=
"control-group">
20 <div class=
"controls">
21 <input class=
"btn btn-primary" type=
"submit" value=
"Post!">
26 {% for post in posts.items %}
27 {% include 'post.html' %}
30 {% if posts.has_prev %}
31 <li class=
"previous"><a href=
"{{ url_for('index', page=posts.prev_num) }}">Newer posts
</a></li>
33 <li class=
"previous disabled"><a href=
"#">Newer posts
</a></li>
35 {% if posts.has_next %}
36 <li class=
"next"><a href=
"{{ url_for('index', page=posts.next_num) }}">Older posts
</a></li>
38 <li class=
"next disabled"><a href=
"#">Older posts
</a></li>