-
Notifications
You must be signed in to change notification settings - Fork 0
/
calendar.html
105 lines (80 loc) · 2.92 KB
/
calendar.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
100
101
102
103
104
105
---
layout: page
active: calendar
title: "Calendar"
auto-title: true
full-page: true
---
<p>This calendar is mostly for planning purposes, but may be useful as an easy way to view deadlines across the quarter.</p>
<p>Note that assignments are listed as due on Friday when due on the Sunday after.</p>
<table class="tbl-outline">
<tr><th>Week</th><th>Day</th><th>Reading</th><th>Lecture</th><th>Lab</th>
{% for pair in site.data.assignments %}
{% assign name = pair[0] %}
{% assign assignment = pair[1] %}
{% if assignment.display != false %}
<th><a href="{{ site.baseurl }}/{{ assignment.type }}s/{{ name }}">{{ assignment.title }}</a></th>
{% endif %}
{% endfor %}
</tr>
{% for week in site.data.weeks %}
{% capture week_color %}{% cycle '#fff', '#EDEDED' %}{% endcapture %}
{% for day in week.days %}
<tr style="background-color: {{ week_color }};">
<td>{{ week.number }}</td>
<td>{{ day.name }}</td>
{% if day.override %}
<td colspan="3"><ul><li>{{ day.override }}</li></ul></td>
{% else %}
<!-- Columns -->
{% for column in site.data.course.schedule_columns %}
<td>
<ul>
{% for item in day[column.name] %}
<li>
{% if item.tag %}
<span class="item-tag bg-{{ site.data.course.tags[item.tag] | default: 'primary' }}">{{ item.tag }}</span>
{% endif %}
{% if item.link %}
<a href="{{ item.link | prepend: site.baseurl }}">{{ item.text }}</a>{% if item.due %} due {{ item.due }}{% endif %}</li>
{% elsif item.outbound %}
<a href="{{ item.outbound }}">{{ item.text }}</a>{% if item.due %} due {{ item.due }}{% endif %}</li>
{% elsif item.text %}
{{ item.text }}</li>
{% else %}
{{ item }}
{% endif %}
</li>
{% endfor %}
{% for date in site.data.dates %}
{% if day.name == date.when %}
{% assign anything = true %}
<li>{{ date.what }}</li>
{% endif %}
{% endfor %}
</ul>
</td>
{% endfor %}
{% endif %}
<!-- Assignments -->
{% for pair in site.data.assignments %}
{% assign name = pair[0] %}
{% assign assignment = pair[1] %}
{% if assignment.display != false %}
<td>
{% if day.name == assignment.due %}
<a href="{{ site.baseurl }}/{{ assignment.type }}s/{{ name }}"><span class="oi oi-circle-x" title="{{assignment.title}} due" aria-hidden="true" style="color: red;"></span></a>
{% endif %}
{% if day.weekend == assignment.due %}
<a href="{{ site.baseurl }}/{{ assignment.type }}s/{{ name }}"><span class="oi oi-circle-x" title="{{assignment.title}} due" aria-hidden="true" style="color: orange;"></span></a>
{% endif %}
{% if day.name == assignment.assigned %}
<a href="{{ site.baseurl }}/{{ assignment.type }}s/{{ name }}"><span class="oi oi-arrow-circle-right" title="{{assignment.title}} assigned" aria-hidden="true" style="color: green;"></span></a>
{% endif %}
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</table>