1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-02 07:04:56 +08:00

修正chapter详情页目录中当前课时高亮问题

This commit is contained in:
xiaochong0302 2024-11-13 21:59:10 +08:00
parent cdc8074f88
commit 9811186434

View File

@ -1,6 +1,6 @@
{%- macro show_lesson_list(chapter) %}
{%- macro show_lesson_list(parent,chapter) %}
<ul class="sidebar-lesson-list">
{% for lesson in chapter.children %}
{% for lesson in parent.children %}
{% set url = url({'for':'home.chapter.show','id':lesson.id}) %}
{% set active = (chapter.id == lesson.id) ? 'active' : 'normal' %}
<li class="lesson-title layui-elip">
@ -22,13 +22,13 @@
{% for item in catalog %}
<div class="chapter-title layui-elip">{{ item.title }}</div>
<div class="sidebar-lesson-list">
{{ show_lesson_list(item) }}
{{ show_lesson_list(item,chapter) }}
</div>
{% endfor %}
</div>
{% else %}
<div class="sidebar-lesson-list">
{{ show_lesson_list(catalog[0]) }}
{{ show_lesson_list(catalog[0],chapter) }}
</div>
{% endif %}
</div>