{% extends "layout.html" %}
{% block title %}{{ user.display_name|e }}{% endblock %}
{% block contents %}
  <h2>{{ user.display_name|e }}</h2>
  {%- if user.real_name and user.real_name != user.display_name %}
    <p>{{ user.real_name }}</p>
  {%- endif %}
  {%- if user.description %}
    <div class="description">{{ user.description }}</div>
  {%- endif %}
  {%- if posts %}
    <h3>{{ _("Posts written by user") }}</h3>
    <ul>
    {%- for post in posts %}
      <li>{% trans post='<a href="%s">%s</a>' % (url_for(post)|e, post.title|e), date=post.pub_date|datetimeformat|e %}{{ post }}, on {{ date }}{% endtrans %}</li>
    {%- endfor %}
    </ul>
  {%- endif %}
  {%- if pagination.necessary %}
  <div class="pagination">
    {{ pagination.generate() }}
  </div>
  {%- endif %}
{% endblock %}
