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.

43 lines
1.7 KiB

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