forked from hedyorg/hedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteacher-manual.html
53 lines (52 loc) · 3.3 KB
/
teacher-manual.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% extends "auth.html" %}
{% block main %}
<div class="" id="teacher_documentation">
<h2 class="text-center">{{ content['title'] }}</h2>
<div class="flex flex-wrap gap-2 justify-center pb-4 border-b">
{% for section in content['sections'] %}
<button class="{% if loop.index != 1 %}green-btn{% else %}blue-btn{% endif %} p-4 section-button" id="button-{{loop.index}}" onclick="hedyApp.show_doc_section('{{loop.index}}')">{{section.title}}</button>
{% endfor %}
</div>
{% for section in content['sections'] %}
<div class="section {% if loop.index != 1 %}hidden{% endif %}" id="section-{{loop.index}}">
{% if section.key != "common_mistakes" %}
{% for subsection in section['subsections'] %}
<h4>{{ subsection.title }}</h4>
<p>{{ subsection.text|commonmark }}</p>
{% endfor %}
{% else %}
<p>{{ section.intro|commonmark }}</p>
<div class="flex flex-col gap-4 mx-0 mb-4 lg:mx-16">
{% for level in section['levels'] %}
<h1 class="section-header" onclick="$('#common_mistakes-{{loop.index}}').slideToggle();">Level {{ level.level }}</h1>
<div class="common-mistakes-section flex flex-col gap-4 mx-0 lg:mx-16" id="common_mistakes-{{loop.index}}">
{% for mistake_section in level.sections %}
<div>
<h2>{{ mistake_section.title }}</h2>
{% if mistake_section.example %} <!-- In this case we expect an error/solution combination -->
<p>{{ mistake_section.example.error_text|commonmark }}</p>
<div class="w-full lg:w-1/2 turn-pre-into-ace my-5">
<pre class="common-mistakes no-copy-button" level="{{ level.level }}" style="font-size: 0.95em;">{{ mistake_section.example.error_code }}</pre>
</div>
<p>{{ mistake_section.example.solution_text|commonmark }}</p>
<div class="w-full lg:w-1/2 turn-pre-into-ace my-5">
<pre class="common-mistakes no-copy-button" level="{{ level.level }}" style="font-size: 0.95em;">{{ mistake_section.example.solution_code }}</pre>
</div>
{% else %}
<p>{{ mistake_section.text|commonmark }}</p>
{% if mistake_section.code %}
<div class="w-full lg:w-1/2 turn-pre-into-ace my-5">
<pre class="common-mistakes no-copy-button" level="{{ level.level }}" style="font-size: 0.95em;">{{ mistake_section.code }}</pre>
</div>
{% endif %}
{% endif %}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
</div>
{% endblock %}