2012-12-16 08:31:21 +00:00
|
|
|
<!-- extend base layout -->
|
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2012-12-16 08:40:47 +00:00
|
|
|
{% include 'flash.html' %}
|
|
|
|
<div class="well well-large" style="height: 140px;">
|
|
|
|
<div class="pull-right">
|
|
|
|
<img src="{{user.avatar(128)}}" class="img-polaroid">
|
|
|
|
</div>
|
|
|
|
<h1>{{user.nickname}}</h1>
|
|
|
|
{% if user.about_me %}<p>{{user.about_me}}</p>{% endif %}
|
|
|
|
{% if user.last_seen %}<p><em>Last seen on: {{user.last_seen}}</em></p>{% endif %}
|
|
|
|
<p>Followers: {{user.followers.count()}} | Following: {{user.followed.count()}} |
|
|
|
|
{% if user.id == g.user.id %}
|
|
|
|
<a href="{{url_for('edit')}}">Edit your profile</a>
|
|
|
|
{% elif not g.user.is_following(user) %}
|
|
|
|
<a href="{{url_for('follow', nickname = user.nickname)}}">Follow</a>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{url_for('unfollow', nickname = user.nickname)}}">Unfollow</a>
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
</div>
|
2012-12-16 08:34:46 +00:00
|
|
|
{% for post in posts.items %}
|
2012-12-16 08:31:21 +00:00
|
|
|
{% include 'post.html' %}
|
|
|
|
{% endfor %}
|
2012-12-16 08:40:47 +00:00
|
|
|
<ul class="pager">
|
|
|
|
{% if posts.has_prev %}
|
|
|
|
<li class="previous"><a href="{{ url_for('user', nickname = user.nickname, 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('user', nickname = user.nickname, 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:31:21 +00:00
|
|
|
{% endblock %}
|