{#  Week days #}
<div class="row">
    <div class="col {% if active_day %}s1{% else %}s2{% endif %}">

    </div>
    {# Show short weekdays on tablets #}
    {% for weekday in weekdays_short %}
    <div class="col s2 hide-on-large-only">
        <div class="card timetable-title-card {% if active_day and weekday.date == active_day %} z-depth-5 {% endif %}">
            <div class="card-content">
              <span class="card-title">
                {{ weekday.name }}
              </span>
                {% if smart %}
                {{ weekday.date }}
                {% if weekday.holiday %}
                <br/>{% include "chronos/partials/holiday.html" with holiday=weekday.holiday %}
                {% endif %}
                {% if weekday.date == today %}
                    <br/> {% include "chronos/partials/today.html" %}
                {% endif %}
                {% endif %}
            </div>
        </div>
    </div>
    {% endfor %}

    {# Show long weekdays elsewere #}
    {% for weekday in weekdays %}
    <div class="col {% if weekday.date == active_day %} s3 {% else %} s2 {% endif %} hide-on-med-only">
        <div class="card timetable-title-card {% if active_day and weekday.date == active_day %} z-depth-5 {% endif %}">
            <div class="card-content">
              <span class="card-title">
                {{ weekday.name }}
              </span>
                {% if smart %}
                {{ weekday.date }}
                {% if weekday.holiday %}
                <br/>{% include "chronos/partials/holiday.html" with holiday=weekday.holiday %}
                {% endif %}
                {% if weekday.date == today %}
                    <br/> {% include "chronos/partials/today.html" %}
                {% endif %}
                {% endif %}
            </div>
        </div>
    </div>
    {% endfor %}
</div>

{#  Lessons #}
{% for row in timetable %}
<div class="row">
    <div class="col {% if active_day %}s1{% else %}s2{% endif %}">
        {% if row.type == "period" %}
        {% include "chronos/partials/period_time.html" with period=row.period periods=periods %}
        {% endif %}
    </div>

    {% for col in row.cols %}
    {# A lesson #}
    <div class="col {% if forloop.counter0 == active_day.weekday %} s3 {% else %} s2 {% endif %}">
        {% if row.type == "period" %}
        {% include "chronos/partials/elements.html" with elements=col week_day=forloop.counter0 active_day=active_day.weekday %}
        {% else %}
        {% include "chronos/partials/supervision.html" with supervision=col %}
        {% endif %}
    </div>
    {% endfor %}
</div>
{% endfor %}