forked from cs107e/cs107e.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitemlist.html
25 lines (22 loc) · 802 Bytes
/
itemlist.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
<!-- This partial used like a function to harvest list from schedule, include.type is either "lab" or "assign" -->
<div class="list-group">
{% for week in site.data.quarter.weeks %}
{% assign plink = week[include.type] %}
<!-- look up by permalink if possible -->
{% assign found = site.pages | where:"permalink",plink | first %}
<!-- Public site won't have unreleased assign/lab, read title from _data/unreleased.csv -->
{% if found == null %}
{% assign unreleased = site.data.unreleased | where:"permalink",plink | first %}
{% if unreleased == null %}
{% continue %}
{% endif %}
{% endif %}
<div class="list-group-item" style="padding: 3px 15px;">
{% if found %}
<a href="{{ found.permalink }}">{{ found.title }}</a>
{% else %}
<i>{{ unreleased.title }}</i>
{% endif %}
</div>
{% endfor %}
</div>