forked from sampsyo/cs6120
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sg.html
38 lines (36 loc) · 1.15 KB
/
sg.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
{% extends "base.html" %}
{% block main %}
{% set lessons = get_section(path="lesson/_index.md") %}
{% set readings = load_data(path="data/reading.toml") %}
{{ page.content | safe }}
{% for lesson in lessons.pages | sort(attribute="extra.index") %}
{% if not lesson.draft %}
<article>
<h1>
<a href="{{ lesson.permalink }}">Lesson {{ lesson.slug }}:</a>
{{ lesson.title }}
</h1>
<ul class="compact">
{% for video in lesson.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 %}
</ul>
</article>
{% if page.extra.readings[lesson.slug] %}
<ul class="inline">
{% for rdkey in page.extra.readings[lesson.slug] %}
{% set reading = readings[rdkey] %}
<li>
<a href="{{reading.link}}" class="icon reading">{{reading.name}}</a>
{% if reading.details %}
<br>{{reading.details}}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endfor %}
{% endblock main %}