forked from sampsyo/cs6120
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson.html
53 lines (53 loc) · 1.8 KB
/
lesson.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
{% extends "base.html" %}
{% block main %}
<h1>
Lesson {{ page.slug }}:
{{ page.title }}
{% if page.draft %}(Draft){% endif %}
</h1>
<ul class="links">
{% if page.extra.thread %}
<li>
<a href="https://github.com/sampsyo/cs6120/discussions/{{page.extra.thread}}" class="icon discussion">discussion thread</a>
</li>
{% endif %}
{% for video in page.extra.videos | default(value=[]) %}
<li>
<a href="{% if video.url %}{{video.url}}{% elif video.id %}https://vod.video.cornell.edu/media/{{video.id}}{% elif video.box_id %}https://cornell.box.com/s/{{video.box_id}}{% endif %}" class="icon video">{{ video.name | default(value="video") }}</a>
</li>
{% endfor %}
{% for reading in page.extra.readings | default(value=[]) %}
<li>
<a href="{{reading.url}}" class="icon reading">{{reading.name}}</a>
{% if reading.details %}
<br>{{reading.details}}
{% endif %}
</li>
{% endfor %}
{% if page.extra.due %}
<li>
<a href="#tasks" class="icon due">tasks</a> due <strong>{{page.extra.due}}</strong>
</li>
{% endif %}
</ul>
{% if page.extra.videos %}
<div class="videos">
{% for video in page.extra.videos %}
{% if video.id %}
<div class="video">
<iframe src="https://cdnapisec.kaltura.com/p/520801/sp/52080100/embedIframeJs/uiconf_id/31230141/partner_id/520801?iframeembed=true&entry_id={{video.id}}" allowfullscreen></iframe>
</div>
{% elif video.box_id %}
<div class="video">
<iframe src="https://cornell.app.box.com/embed/s/{{video.box_id}}" allowfullscreen></iframe>
</div>
{% elif video.pt_id %}
<div class="video">
<iframe sandbox="allow-same-origin allow-scripts allow-popups" src="https://video.radbox.org/videos/embed/{{video.pt_id}}" allowfullscreen></iframe>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{{ page.content | safe }}
{% endblock main %}