{% set no_path_section = true %} {% set page_name = "homepage" %} {% extends "layout/basic.html" %} {% import "components/contest.html" as contest with context %} {% block content %} {% if domain['bulletin'] %}
{{ domain['bulletin']|markdown|safe }}
{% endif %}
{% if tdocs.length %}

{{ _('Contest') }}

    {%- for tdoc in tdocs -%}
  1. {{ datetimeSpan(tdoc['beginAt'], false, '%d')|safe }}
    {{ datetimeSpan(tdoc['beginAt'], false, '%Y-%m')|safe }}

    {{ tdoc.title }}

    • {{ model.contest.RULES[tdoc.rule].TEXT }}
    • {{ contest.render_duration(tdoc) }} {{ _('hour(s)') }}
    • {{ tdoc['attend']|default(0) }}
    • {% if tsdict[tdoc.docId]['attend'] == 1 %}
    • {{ _('Attended') }}
    • {% endif %}
  2. {%- endfor -%}
{% endif %} {% if htdocs.length %}

{{ _('Homework') }}

    {%- for tdoc in htdocs -%}
  1. {{ datetimeSpan(tdoc['penaltySince'], false, '%d')|safe }}
    {{ datetimeSpan(tdoc['penaltySince'], false, '%Y-%m')|safe }}

    {{ tdoc['title'] }}

    • {{ _('Status') }}: {{ _(model.contest.statusText(tdoc)) }}
    • {{ _('Open Since') }}: {{ datetimeSpan(tdoc['beginAt'])|safe }}
    • {% if model.contest.isExtended(tdoc) or model.contest.isDone(tdoc) %} {{ _('Hard Deadline') }}: {{ datetimeSpan(tdoc['endAt'])|safe }} {% else %} {{ _('Deadline') }}: {{ datetimeSpan(tdoc['penaltySince'])|safe }} {% endif %}
    • {% if htsdict[tdoc['docId']]['attend'] == 1 %}
    • {{ _('Claimed') }}
    • {% endif %}
  2. {%- endfor -%}
{% endif %} {% if trdocs.length %}

{{ _('Training') }}

{% set tdocs = trdocs %} {% set tsdict = trsdict %}
    {%- for tdoc in tdocs -%}
  1. {{ tdoc['enroll']|default(0) }}
    {{ _('Enrolled') }}

    {{ tdoc.title }}

    {{ tdoc['content'] }}

    • {{ _('{0} sections').format(tdoc['dag']|length) }}, {{ _('{0} problems').format(model.training.getPids(tdoc.dag)|length) }}
    • {% if tsdict[tdoc.docId]['enroll'] %} {% if not tsdict[tdoc.docId]['done'] %} {{ _('Completed') }} {{ (100 * tsdict[tdoc.docId]['donePids']|length / model.training.getPids(tdoc.dag)|length)|round|int }}% {% else %} {{ _('Completed') }} 100% {% endif %} {% elif handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {{ _('Not Enrolled') }} {% endif %}
  2. {%- endfor -%}
{% endif %} {% if ddocs.length %}

{{ _('Discussion') }}

{% include "partials/discussion_list.html" %}
{% endif %}

{{ _('Hitokoto') }}

{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}

{{ _('Check In') }}

还没做好(前端不会做欢迎来帮忙)
{% endif %} {% if handler.user.hasPerm(perm.PERM_VIEW_DISCUSSION) %} {% include 'partials/discussion_nodes_widget.html' %} {% endif %}

{{ _('Recommended') }}

{% endblock %}