You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.9 KiB

  1. {% extends "base.html" %}
  2. {% import "_macros.html" as macros %}
  3. {% block title %}Flasky - {{ user.username }}{% endblock %}
  4. {% block page_content %}
  5. <div class="page-header">
  6. <img class="img-rounded profile-thumbnail" src="{{ user.gravatar(size=256) }}">
  7. <div class="profile-header">
  8. <h1>{{ user.username }}</h1>
  9. {% if user.name or user.location %}
  10. <p>
  11. {% if user.name %}
  12. {{ user.name }}{% endif %}
  13. {% if user.location %}from
  14. <a href="https://maps.google.com/?q={{ user.location }}">
  15. {{ user.location }}</a>
  16. {% endif %}
  17. </p>
  18. {% endif %}
  19. {% if user.is_administrator %}
  20. <p><a href="mailto:{{ user.email }}">{{ user.email }}</a></p>
  21. {% endif %}
  22. {% if user.about_me %}
  23. <p>{{ user.about_me }}</p>
  24. {% endif %}
  25. <p>
  26. Member since {{ moment(user.member_since).format('L') }}.
  27. Last seen {{ moment(user.last_seen).fromNow() }}.
  28. <p>{{ user.posts.count() }} blog post{% if user.posts.count() > 1 %}s{% endif %}.</p>
  29. </p>
  30. <p>
  31. {% if user == current_user %}
  32. <a class="btn btn-default" href="{{ url_for('.edit_profile') }}">Edit Profile</a>
  33. {% endif %}
  34. {% if current_user.is_administrator %}
  35. <a class="btn btn-danger" href="{{ url_for('.edit_profile_admin', id=user.id) }}">Edit Profile [Admin]</a>
  36. {% endif %}
  37. </p>
  38. </div>
  39. </div>
  40. <h3>Posts by {{ user.username }}</h3>
  41. {% include '_posts.html' %}
  42. {% if pagination %}
  43. <div class="pagination">
  44. {{ macros.pagination_widget(pagination, '.user', username=user.username) }}
  45. </div>
  46. {% endif %}
  47. {% endblock %}