-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathevents.html
65 lines (59 loc) · 2.29 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
---
layout: default
---
<section class="l-section">
<div class="l-wrapper">
<h1><span class="main-headline">Upcoming Events</span></h1>
</div>
<div class="l-wrapper-large">
<div class="m-blocks">
{% for event in site.events %}
{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}
{% capture posttime %}{{event.eventDate | date: '%s'}}{% endcapture %}
{% if posttime > nowunix %}
<div class="m-blocks__block">
<div class="m-blocks__wrapper">
<h2>{{ event.title }}</h2>
<p class="m-blocks__date">{{ event.datePretty }} | {{ event.location }} | {{ event.time }}</p>
<p class="m-blocks__description">{{ event.description }}</p>
{% assign link = '' %}
{% if site.events.last.link != null %}
{% assign link = site.events.last.link | prepend: site.baseurl %}
{% else %}
{% assign link = site.events.last.url | prepend: site.baseurl %}
{% endif %}
<a class="button" href="{{ link }}">Read more</a>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="l-wrapper">
<h1><span class="main-headline">Past Events</span></h1>
</div>
<div class="l-wrapper-large">
<div class="m-blocks">
{% for event in site.events reversed %}
{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}
{% capture posttime %}{{event.eventDate | date: '%s'}}{% endcapture %}
{% if posttime < nowunix %}
<div class="m-blocks__block">
<div class="m-blocks__wrapper">
<h2>{{ event.title }}</h2>
<p class="m-blocks__date">{{ event.datePretty }} | {{ event.location }} | {{ event.time }}</p>
<p class="m-blocks__description">{{ event.description }}</p>
{% assign link = '' %}
{% if event.link != null %}
{% assign link = event.link | prepend: site.baseurl %}
{% else %}
{% assign link = event.url | prepend: site.baseurl %}
{% endif %}
<a class="button" href="{{ link }}">Read more</a>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</section>