-
Notifications
You must be signed in to change notification settings - Fork 6
/
events.html
54 lines (49 loc) · 1.87 KB
/
events.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
---
nav: events
title: "Events"
---
{%- assign events = site.events | sort: 'time.start' -%}
{%- assign prevYear = 0 -%}
{%- assign currentEvents = true -%}
<h3>Upcoming events</h3>
{% for event in events reversed -%}
{%- assign year = event.time.start | date: "%Y" -%}
{%- if currentEvents -%}
{%- unless event.upcoming -%}
{%- assign currentEvents = false -%}
{% if prevYear == 0 -%}
<p>We haven't announced any of our future events yet. Stay tuned for
further details.</p>
{%- endif %}
<h3>Past events</h3>
{%- assign prevYear = 0 -%}
{%- endunless -%}
{%- endif -%}
{% unless year == prevYear or currentEvents -%}
<h4>{{ year }}</h4>
{%- endunless %}
<a href="{{ '/events/' | append: event.slug | relative_url }}" class="plain">
<div class="card event-card">
{%- assign attrKeys = '' | split: '' -%}
{%- assign attrVals = '' | split: '' -%}
{%- assign attrKeys = attrKeys | push: 'class' -%}
{%- assign attrVals = attrVals | push: 'headshot' -%}
{%- assign img = 'events/' | append: event.slug | append: '/thumbnail' -%}
{% include img.html
img=img
imgDefault='events/default/thumbnail'
alt=event.title
attrKeys=attrKeys
attrVals=attrVals
%}
{% assign eventType = site.data['event-types'][event.type] -%}
<div class="text">
<h5><span class="muted">{{ eventType.name }}:</span> {{ event.title | smartify }}</h5>
<p>{{ event.description | markdownify }}</p>
</div>
</div>
</a>
{%- assign prevYear = year -%}
{%- endfor %}
<h6>Something missing?</h6>
<p>We're still working on updating our archives. In the meantime, you can find videos of our older talks <a href="https://www.youtube.com/results?search_query=TEDxWarwick" target="_blank">on YouTube</a>.</p>