Skip to content

Commit 572b786

Browse files
committed
Visually structure session headings on course pages
1 parent 8fd2b82 commit 572b786

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

naucse/templates/course.html

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
{% extends "_base.html" %}
22
{% from "_material_macros.html" import material_list with context %}
33

4-
{% macro session_heading(session, index, plan) %}
5-
{% if plan|length > 1 %}
6-
Lekce {{ index }} –
7-
{% endif %}
8-
{{ session.title }}
9-
{% if session.date %}
10-
({{ session.date | format_date }})
11-
{% endif %}
12-
{% endmacro %}
13-
144
{% block content %}
155

166
<div class="page">
@@ -42,9 +32,15 @@ <h2>{{ course.subtitle }}</h2>
4232
{% for session in plan.values() %}
4333
<div class="section{{ loop.index }}">
4434
<h4>
35+
{% if plan|length > 1 %}
36+
Lekce {{ loop.index }} –
37+
{% endif %}
4538
<a href="{{ session_url(course.slug, session.slug) }}">
46-
{{ session_heading(session, loop.index, plan) }}
39+
{{ session.title }}
4740
</a>
41+
{% if session.date %}
42+
<small>({{ session.date | format_date }})</small>
43+
{% endif %}
4844
</h4>
4945
{{ material_list(session.materials) }}
5046
</div>

0 commit comments

Comments
 (0)