2 Display syllabus in tabular form.
3 Days are displayed if at least one episode has 'start = true'.
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="{{ site.root }}{{ episode.url }}">{{ episode.title }}</a>
40 {% if episode.break %}
43 {% if episode.questions %}
44 {{ episode.questions | join: '<br/>' }}
49 {% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
51 {% assign hours = current | divided_by: 60 %}
52 {% assign minutes = current | modulo: 60 %}
54 {% if multiday %}<td></td>{% endif %}
55 <td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
56 <td class="col-md-3">Finish</td>
57 <td class="col-md-7"></td>