Spaces:
Runtime error
Runtime error
| {% extends "base.html" %} | |
| {% block content %} | |
| <table class="table table-hover"> | |
| <tr> | |
| <td width="256px"><img src="{{ user.avatar(256) }}"></td> | |
| <td> | |
| <h1>{{ _('User') }}: {{ user.username }}</h1> | |
| {% if user.about_me %}<p>{{ user.about_me }}</p>{% endif %} | |
| {% if user.last_seen %} | |
| <p>{{ _('Last seen on') }}: {{ moment(user.last_seen).format('LLL') }}</p> | |
| {% endif %} | |
| <p>{{ _('%(count)d followers', count=user.followers_count()) }}, {{ _('%(count)d following', count=user.following_count()) }}</p> | |
| {% if user == current_user %} | |
| <p><a href="{{ url_for('main.edit_profile') }}">{{ _('Edit your profile') }}</a></p> | |
| {% elif not current_user.is_following(user) %} | |
| <p> | |
| <form action="{{ url_for('main.follow', username=user.username) }}" method="post"> | |
| {{ form.hidden_tag() }} | |
| {{ form.submit(value=_('Follow'), class_='btn btn-primary') }} | |
| </form> | |
| </p> | |
| {% else %} | |
| <p> | |
| <form action="{{ url_for('main.unfollow', username=user.username) }}" method="post"> | |
| {{ form.hidden_tag() }} | |
| {{ form.submit(value=_('Unfollow'), class_='btn btn-primary') }} | |
| </form> | |
| </p> | |
| {% endif %} | |
| </td> | |
| </tr> | |
| </table> | |
| {% for post in posts %} | |
| {% include '_post.html' %} | |
| {% endfor %} | |
| <nav aria-label="Post navigation"> | |
| <ul class="pagination"> | |
| <li class="page-item{% if not prev_url %} disabled{% endif %}"> | |
| <a class="page-link" href="{{ prev_url }}"> | |
| <span aria-hidden="true">←</span> {{ _('Newer posts') }} | |
| </a> | |
| </li> | |
| <li class="page-item{% if not next_url %} disabled{% endif %}"> | |
| <a class="page-link" href="{{ next_url }}"> | |
| {{ _('Older posts') }} <span aria-hidden="true">→</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </nav> | |
| {% endblock %} | |