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">
17 {% if multiday %}<td class="col-md-1"></td>{% endif %}
18 <td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}"></td>
19 <td class="col-md-3"><a href="{{ page.root }}/setup">Setup</a></td>
20 <td class="col-md-7">Dowload files used on the lesson.</td>
22 {% for episode in site.episodes %}
23 {% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
24 {% assign day = day | plus: 1 %}
25 {% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
26 {% assign hours = current | divided_by: 60 %}
27 {% assign minutes = current | modulo: 60 %}
29 {% if multiday %}<td class="col-md-1"></td>{% endif %}
30 <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>
31 <td class="col-md-3">Finish</td>
32 <td class="col-md-7"></td>
35 {% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %}
37 {% assign hours = current | divided_by: 60 %}
38 {% assign minutes = current | modulo: 60 %}
40 {% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
41 <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>
43 <a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a>
46 {% if episode.break %}
49 {% if episode.questions %}
50 {% for question in episode.questions %}
51 {{question|markdownify|strip_html}}
52 {% unless forloop.last %}
60 {% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
62 {% assign hours = current | divided_by: 60 %}
63 {% assign minutes = current | modulo: 60 %}
65 {% if multiday %}<td class="col-md-1"></td>{% endif %}
66 <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>
67 <td class="col-md-3">Finish</td>
68 <td class="col-md-7"></td>
73 The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.