-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathevents.html
73 lines (67 loc) · 2.72 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
layout: default
title: Events
---
{% capture future_events %}{% for event in site.data.events %}{% if event.status == 'future' %}
<h3><a href="{{ event.link }}">{{ event.title }}</a></h3>
{% if event.from %}
<p class="date">{{ event.from | date: "%-d %B %Y" }}{% if event.to %} - {{ event.to | date: "%-d %B %Y" }}</p>{% endif %}
{% elsif event.date %}<p class="date">{{ event.date }}</p>{% endif %}
<span>{{ event.description | markdownify }}</span><a href="{{ event.link }}">More</a>@@{% endif %}{% endfor %}{% endcapture %}
{% assign future_e = future_events | split:"@@" %}
{% capture featured_events %}{% for event in site.data.events %}{% if event.status == 'featured' %}
<h3><a href="{{ event.link }}">{{ event.title }}</a></h3>
{% if event.from %}
<p class="date">{{ event.from | date: "%-d %B %Y" }}{% if event.to %} - {{ event.to | date: "%-d %B %Y" }}</p>{% endif %}
{% elsif event.date %}<p class="date">{{ event.date }}</p>{% endif %}
<span>{{ event.description | markdownify }}</span><a href="{{ event.link }}">More</a>@@{% endif %}{% endfor %}{% endcapture %}
{% assign featured_e = featured_events | split:"@@" %}
{% capture past_events %}{% for event in site.data.events %}{% if event.status == 'past' %}
<h3><a href="{{ event.link }}">{{ event.title }}</a></h3>
{% if event.from %}
<p class="date">{{ event.from | date: "%-d %B %Y" }}{% if event.to %} - {{ event.to | date: "%-d %B %Y" }}</p>{% endif %}
{% elsif event.date %}<p class="date">{{ event.date }}</p>{% endif %}
<span>{{ event.description | markdownify }}</span>
<a href="{{ event.link }}">More</a>@@{% endif %}{% endfor %}{% endcapture %}
{% assign past_e = past_events | split:"@@" %}
<div class="events">
<div class="banner">
<div class="wrapper">
<h1>{{ page.title }}</h1>
</div>
</div>
<div class="wrapper">
{% if featured_e != empty %}
<section class="featured">
<h2>Featured Event</h2>
{{ featured_e | first }}
</section>
{% endif %}
<section>
<h2>Future Events</h2>
{% if future_e != empty %}
<ul class="event-list">
{% for e in future_e %}
<li>
{{ e }}
</li>
{% endfor %}
</ul>
{% else %}
No future events
{% endif %}
</section>
{% if past_e != empty %}
<section>
<h2>Past Events</h2>
<ul class="event-list">
{% for e in past_e %}
<li>
{{ e }}
</li>
{% endfor %}
</ul>
</section>
{% endif %}
</div>
</div>