diff --git a/_layouts/timetables.html b/_layouts/timetables.html new file mode 100644 index 00000000..7a0a64bb --- /dev/null +++ b/_layouts/timetables.html @@ -0,0 +1,72 @@ +--- +layout: single +days: + - "Δευτέρα" + - "Τρίτη" + - "Τετάρτη" + - "Πέμπτη" + - "Παρασκευή" +--- + +{% capture days %}Δευτέρα;Τρίτη;Τετάρτη;Πέμπτη;Παρασκευή{% endcapture %} +{% assign days = days | split: ';'%} + +
+ + + + {% for day in days %} + {% if day %} + + {% endif %} + {% endfor %} + + {% for time in (9..20) %} + + + {% for day in days %} + {% if day %} + {% assign s = time | downcase %} + {% assign lectures = page.timetable | where: "day", day%} + {% assign has_lecture = false %} + {% for lect in lectures%} + {% if lect.time == time %} + {% assign course = site.courses | where: "ref", lect.course | first %} + + {% assign has_lecture = true %} + {% endif %} + {% endfor %} + {% assign ptime = time | plus: -1 %} + {% assign previous_lect = false %} + {% for lecture in lectures %} + {% if lecture.time == ptime %} + {% assign previous_lect = true %} + {% endif %} + {% endfor %} + {% if previous_lect == true %} + {% else %} + {% if has_lecture == false %} + + {% else %} + + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + + {% endfor %} +
{{ day }}
{{time}}:00-{{ time | plus: 1 }}:00 + {% if course %} + {{ course.title }} + {% else %} + {{lect.course}} + {% endif %} +
+ {% assign author = site.people | where: "ref", lect.author | first %} + {% if author %} + {{ author.title }} + {% else %} + {{lect.author}} + {% endif %} +
{{lect.location}}
+