This repository has been archived by the owner on May 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
schedule-compact.html
54 lines (50 loc) · 1.84 KB
/
schedule-compact.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
---
layout: subpage-wide
page_id: schedule-compact
title: "Schedule"
permalink: /schedule-compact/
---
<ol class="c-schedule c-schedule--compact">
{% for slot in site.data.schedule %}
{% assign firstSpeaker = site.speakers | where: "talk_id", slot.talk_id | last %}
<li class="c-schedule__item">
<div class="c-schedule-item c-schedule-item--compact c-schedule-item--{{ slot.type }} {% if firstSpeaker %}c-schedule-item--{{ firstSpeaker.bg }}{% endif %}">
<time class="tac c-schedule-item__time">
{{ slot.start_time }}
</time>
<div class="c-schedule-item__content">
{% if slot.type == "talk" %}
{% assign talk = site.talks | where: "talk_id", slot.talk_id | first %}
{% assign speakers = site.speakers | where: "talk_id", slot.talk_id %}
{% comment %}
Here we have a little hackiness to add markup for our replacement speaker
{% endcomment %}
<h2 class="c-schedule-item__title">
{% for speaker in speakers %}
{% if forloop.index != 1 %}&{% endif %}
{% if speaker.replacement %}
<s>{{ speaker.name }}</s> {{speaker.replacement}}
{% else %}
{{ speaker.name }}
{% endif %}
{% endfor %}
</h2>
{% if talk.title %}
<p class="c-schedule-item__text">
<a href="{{ firstSpeaker.url }}#talk">{{ talk.title }}</a>
</p>
{% endif %}
{% else %}
<h2 class="c-schedule-item__title">
{% if slot.title %}
{{ slot.title }}
{% else %}
{{ slot.type | capitalize }}
{% endif %}
</h2>
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ol>