-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcourse.liquid
More file actions
75 lines (70 loc) · 2.15 KB
/
course.liquid
File metadata and controls
75 lines (70 loc) · 2.15 KB
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
---
layout: page
---
<div class="course">
{% if page.instructor or page.term or page.location or page.time %}
<div class="course-info">
{% if page.instructor %}
<p><strong>Instructor:</strong> {{ page.instructor }}</p>
{% endif %}
{% if page.term %}
<p><strong>Term:</strong> {{ page.term }}</p>
{% endif %}
{% if page.location %}
<p><strong>Location:</strong> {{ page.location }}</p>
{% endif %}
{% if page.time %}
<p><strong>Time:</strong> {{ page.time }}</p>
{% endif %}
</div>
{% endif %}
{{ content }}
{% if page.schedule %}
<h2>Schedule</h2>
<table class="table table-sm table-responsive">
<thead>
<tr>
<th>Week</th>
<th>Date</th>
<th>Topic</th>
<th>Materials</th>
</tr>
</thead>
<tbody>
{% for entry in page.schedule %}
<tr>
<td>{{ entry.week }}</td>
<td>{{ entry.date }}</td>
<td>
{% if entry.topic %}
<strong>{{ entry.topic }}</strong>
{% endif %}
{% if entry.description %}
<div class="schedule-description">{{ entry.description | markdownify }}</div>
{% endif %}
</td>
<td>
{% if entry.materials %}
<ul class="schedule-materials">
{% for material in entry.materials %}
<li>
{% if material.url %}
{% if material.url contains '://' %}
<a href="{{ material.url }}" target="_blank">{{ material.name }}</a>
{% else %}
<a href="{{ material.url | relative_url }}" target="_blank">{{ material.name }}</a>
{% endif %}
{% else %}
{{ material.name }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>