2 Display syllabus in tabular form.
3 Days are displayed if at least one episode has 'start = true'.
6 <h2 id="schedule">Schedule</h2>
9 {% assign multiday = false %}
10 {% for episode in site.episodes %}
11 {% if episode.start %}{% assign multiday = true %}{% break %}{% endif %}
13 {% assign current = site.start_time %}
15 <table class="table table-striped">
16 {% for episode in site.episodes %}
17 {% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
18 {% assign day = day | plus: 1 %}
19 {% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
20 {% assign hours = current | divided_by: 60 %}
21 {% assign minutes = current | modulo: 60 %}
23 {% if multiday %}<td></td>{% endif %}
24 <td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
25 <td class="col-md-3">Finish</td>
26 <td class="col-md-7"></td>
29 {% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %}
31 {% assign hours = current | divided_by: 60 %}
32 {% assign minutes = current | modulo: 60 %}
34 {% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
35 <td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
37 <a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a>
40 {% if episode.break %}
43 {% if episode.questions %}
44 {% for question in episode.questions %}
45 {{question|markdownify|strip_html}}
46 {% unless forloop.last %}
54 {% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
56 {% assign hours = current | divided_by: 60 %}
57 {% assign minutes = current | modulo: 60 %}
59 {% if multiday %}<td></td>{% endif %}
60 <td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
61 <td class="col-md-3">Finish</td>
62 <td class="col-md-7"></td>
67 The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.