-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule.html
99 lines (86 loc) · 2.96 KB
/
schedule.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
layout: page
title: Class Schedule
---
<table>
<colgroup>
<col width="15%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup><thead>
<tr class="header">
<th style="background-color:#167F92;color:#FFF;"> Session </th>
<th style="background-color:#167F92;color:#FFF;"> Reading </th>
<th style="background-color:#167F92;color:#FFF;"> Topics </th>
<th style="background-color:#167F92;color:#FFF;"> Material </th>
</tr>
</thead>
<tbody>
{% assign stuff = site.data.date_convert | concat: site.data.assignments | sort: "date" %}
{% for session in stuff %}
{% capture week_day %}
{% if session.class_num <= 20 %}
{{ session.class_num | plus:1 | modulo:4 }}
{% else %}
{{ session.class_num | minus:1 | modulo:4 }}
{% endif %}
{% endcapture %}
<!-- {% if week_day contains "0" %}
{% assign style = "border_top" %}
{% endif %} -->
{% if session.type == "class_session" %}
{% if site.data.schedule[session.class_num] %}
{% assign event = site.data.schedule[session.class_num] %}
<tr {% if event.bgcolor %} bgcolor="#{{event.bgcolor}}" {% endif %} >
<td>
{{ session.class_num }} <br/> {{ session.date | date: "%A" }} <br/> {{ session.date | date: "%b %d" }}
</td>
<td>
{% for item in event.reading %}
<li> {{ item }} </li>
{% endfor %}
</td>
<td>
{% for item in event.topics %}
<li> {{ item }} </li>
{% endfor %}
</td>
<td>
{% for material in event.materials %}
<a href="{{ site.github.repository_url }}/tree/master/ClassMaterials/{{ material }}">{{material}}</a><br/>
{% endfor %}
{{event.other | join: "<br/>"}}
</td>
</tr>
{% else %} <!-- we have a class but it's not is schedule.yml -->
<!-- {% capture week %}
{{ session.class_num | minus:1 | modulo:4 }}
{% endcapture %}
{% assign style = ""%} -->
<tr>
<td class="center">
{{ session.class_num }} <br/> {{ session.date | date: "%A" }} <br/> {{ session.date | date: "%b %d" }}
</td>
<td class="center" colspan="3" >
N/A
</td>
</tr>
{% endif %}
{% else %}
{% unless {{session.name}} contains "#" %}
<tr bgcolor="#ddf" >
<td colspan="4">
{% if session.dirname %}<a href="{{ site.baseurl
}}/docs/{{ session.dirname }}">{{session.name}}</a>
{% else %}{{session.name}}{% endif %}
DUE {{ session.date | date: "%A %D %l:%M %P" }}
{% if session.moodle %}<a href="{{ session.moodle }}"> Submit Here</a>{% endif %}
{% if session.grader %} <font color="#aaa"> grader: {{session.grader}}@</font> {% endif %}
</td>
</tr>
{% endunless %}
{% endif %}
{% endfor %}
</tbody>
</table>