2 Display syllabus in tabular form.
3 Days are displayed if at least one episode has 'start = true'.
6 <h2 id="schedule">Schedule</h2>
8 {% assign lesson_number = 0 %}
10 {% assign multiday = false %}
11 {% for episode in site.episodes %}
12 {% if episode.start %}{% assign multiday = true %}{% break %}{% endif %}
14 {% assign current = site.start_time %}
16 <table class="table table-striped">
18 {% if multiday %}<td class="col-md-1"></td>{% endif %}
19 <td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}"></td>
20 <td class="col-md-3"><a href="{{ page.root }}{% link setup.md %}">Setup</a></td>
21 <td class="col-md-7">Download files required for the lesson</td>
23 {% for episode in site.episodes %}
24 {% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
25 {% assign day = day | plus: 1 %}
26 {% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
27 {% assign hours = current | divided_by: 60 %}
28 {% assign minutes = current | modulo: 60 %}
30 {% if multiday %}<td class="col-md-1"></td>{% endif %}
31 <td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
32 <td class="col-md-3">Finish</td>
33 <td class="col-md-7"></td>
36 {% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %}
38 {% assign hours = current | divided_by: 60 %}
39 {% assign minutes = current | modulo: 60 %}
41 {% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
42 <td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
44 {% assign lesson_number = lesson_number | plus: 1 %}
45 {{ lesson_number }}. <a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a>
48 {% if episode.break %}
51 {% if episode.questions %}
52 {% for question in episode.questions %}
53 {{question|markdownify|strip_html}}
54 {% unless forloop.last %}
62 {% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
64 {% assign hours = current | divided_by: 60 %}
65 {% assign minutes = current | modulo: 60 %}
67 {% if multiday %}<td class="col-md-1"></td>{% endif %}
68 <td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
69 <td class="col-md-3">Finish</td>
70 <td class="col-md-7"></td>
75 The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.