{% import "components/ui/v1.html" as ui_v1 %} {% extends "layout/basic.html" %} {% block content %}
{% call ui_v1.page_header(lesson.title, chapter.title ~ ' · ' ~ vpdoc.version) %} {% if lesson.hidden %}{{ ui_v1.badge(_('已隐藏'), 'warning') }}{% endif %} {{ _('返回章节预览') }} {% if canManage %}{{ _('编辑节') }}{% endif %} {% if canCopy %} {{ _('复制') }} {{ _('建比赛') }} {% endif %} {% endcall %} {% for block in blocks %} {% if block.type == 'content' and block.content %}

{{ block.title or _('小节内容') }}

{{ block.content|markdown|safe }}
{% elif block.type == 'lecture' %}

{{ block.title or _('本节讲义') }} · {{ block.items.length }}

    {% for item in block.items %}
  1. {% if item.unavailable %}{{ loop.index }}. P{{ item.pid }}{% else %}{{ loop.index }}. {{ item.displayId }} · {{ item.title }}{% endif %}

    {% if item.unavailable %}

    {{ _('讲义不存在、暂无查看权限或受到比赛访问限制。') }}

    {% endif %}
    {% if item.unavailable %}
    {{ ui_v1.badge(_('暂时无法查看'), 'warning') }}
    {% endif %}
  2. {% endfor %}
{% elif block.type == 'problems' %}

{{ block.title or _('本节题目') }} · {{ block.items.length }}

{% if block.items.length %}
    {% for item in block.items %}
  1. {% if item.unavailable %}{{ loop.index }}. P{{ item.pid }}{% else %}{{ loop.index }}. {{ item.displayId }} · {{ item.title }}{% endif %}

    {% if item.unavailable %}

    {{ _('题目不存在、暂无查看权限或受到比赛访问限制。') }}

    {% endif %}
    {% if item.unavailable %}{{ ui_v1.badge(_('暂时无法查看'), 'warning') }}{% else %}{{ ui_v1.category_label(_(item.difficultyLabel), item.difficulty) }}{% endif %}
  2. {% endfor %}
{% else %}{{ ui_v1.empty_state(_('本节还没有题目。')) }}{% endif %}
{% elif block.type == 'video' %}
{% endif %} {% endfor %}
{% endblock %}