2012-12-16 08:28:52 +00:00
|
|
|
<!-- extend base layout -->
|
2012-12-16 08:26:19 +00:00
|
|
|
{% extends "base.html" %}
|
2012-12-16 08:28:52 +00:00
|
|
|
|
2012-12-16 08:26:19 +00:00
|
|
|
{% block content %}
|
2012-12-16 08:34:46 +00:00
|
|
|
<h1>Hi, {{g.user.nickname}}!</h1>
|
2012-12-16 08:40:47 +00:00
|
|
|
{% include 'flash.html' %}
|
|
|
|
<div class="well">
|
|
|
|
<form class="form-horizontal" action="" method="post" name="post">
|
|
|
|
{{form.hidden_tag()}}
|
|
|
|
<div class="control-group{% if form.errors.post %} error{% endif %}">
|
|
|
|
<label class="control-label" for="post">Say something:</label>
|
|
|
|
<div class="controls">
|
|
|
|
{{ form.post(size = 30, maxlength = 140) }}
|
|
|
|
{% for error in form.errors.post %}
|
|
|
|
<span class="help-inline">[{{error}}]</span><br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<input class="btn btn-primary" type="submit" value="Post!">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2012-12-16 08:34:46 +00:00
|
|
|
{% for post in posts.items %}
|
|
|
|
{% include 'post.html' %}
|
2012-12-16 08:26:19 +00:00
|
|
|
{% endfor %}
|
2012-12-16 08:40:47 +00:00
|
|
|
<ul class="pager">
|
|
|
|
{% if posts.has_prev %}
|
|
|
|
<li class="previous"><a href="{{ url_for('index', page = posts.prev_num) }}">Newer posts</a></li>
|
|
|
|
{% else %}
|
|
|
|
<li class="previous disabled"><a href="#">Newer posts</a></li>
|
|
|
|
{% endif %}
|
|
|
|
{% if posts.has_next %}
|
|
|
|
<li class="next"><a href="{{ url_for('index', page = posts.next_num) }}">Older posts</a></li>
|
|
|
|
{% else %}
|
|
|
|
<li class="next disabled"><a href="#">Older posts</a></li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2012-12-16 08:26:19 +00:00
|
|
|
{% endblock %}
|