{% import "components/home.html" as home with context %} {% import "components/problem.html" as problem with context %} {% extends "layout/basic.html" %} {% block content %} {{ set(UiContext, 'udoc', udoc) }}
{% if udoc.backgroundImage %}{% endif %}

{% block profile_identity %} {{ udoc['uname'] }} {% if handler.user.hasPerm(perm.PERM_VIEW_USER_PRIVATE_INFO) and udoc.displayName %}({{ udoc['displayName'] }}){% endif %} {% endblock %}

{{ _('UID') }}: {{ udoc['_id'] }}, {{ _('Registered at') }} {{ datetimeSpan(udoc['regat'])|safe }}, {{ _('last login at') }} {{ datetimeSpan(udoc['loginat'])|safe }}, {% if sdoc and sdoc.updateAt %} {{ _('last active at') }} {{ datetimeSpan(sdoc['updateAt'])|safe if Date.now() - sdoc.updateAt.getTime() > 300000 else _('just now') }}. {% else %} {{ _('currently offline') }}. {% endif %}

{% block profile_extra_metadata %}{% endblock %}

{{ _('Solved {0} problems, RP: {1} (No. {2})').format(udoc.nAccept|default(0), udoc['rp']|default(0.0)|round(2), udoc['rank']|default('?')) }}

{% if udoc._id != 1 and not udoc.hasPriv(PRIV.PRIV_USER_PROFILE) %}

{{ _('This user was banned.') }}

{% endif %}
{% if isSelfProfile %} {% endif %} {% if udoc['mail'] %} {% endif %} {% if udoc['qq'] %} {% endif %} {% if udoc['wechat'] %} {% endif %} {% if udoc.gender and udoc.gender != model.builtin.USER_GENDER_OTHER %} {{ model.builtin.USER_GENDER_ICONS[udoc.gender] }} {% endif %} {% if udoc.hasPriv(PRIV.PRIV_MOD_BADGE) %} {% elif udoc.hasPerm(perm.PERM_MOD_BADGE) %} {% endif %}
  • {{ _('Bio') }}

    {% if not udoc.bio %} {{ nothing.render("This person is lazy and didn't write anything.") }} {% else %}
    {{ udoc.bio|default('')|markdown|safe }}
    {% endif %}
  • {% if pdocs.length %}
  • {{ _('Accepted Problems') }}

      {% for pdoc in pdocs %}
    • {{ problem.render_problem_title(pdoc, show_tags=false, small=true) }}
    • {% endfor %}
  • {% endif %} {% for page in findSubModule('partials/user_detail/') %}{% include page %}{% endfor %}
{% if isSelfProfile %} {{ home.render_sidebar() }} {% endif %}
{% if tags.length %}

{{ _('Problem Tags') }}

{% for tag in tags %}
{{ tag[0] }}
{{ tag[1] }}
{% endfor %}
{% endif %}
{% endblock %}