-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
61 lines (56 loc) · 2.47 KB
/
index.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
---
layout: default
title: Open Knowlege events
description: Upcoming and past training events from Open Knowledge activities and programmes.
---
Event listing in date order from live event-template metadata (se end of page).
<h2>OKF current events</h2>
{% assign eventlist = site.pages | where: 'layout', 'event' | sort: "date" %}
{% capture now %}{{'now' | date: '%s' | plus: 0 %}}{% endcapture %}
{% for node in eventlist %}
{% capture date %}{{node.date | date: '%s' | plus: 0 %}}{% endcapture %}
{% if date >= now %}
{% if node.layout == 'event' %}
<div class="eventlisting">
<p class="eventlisting-eventdateandtitle">
<span class="eventlisting-eventtitle">
<a href="{{ site.baseurl }}{{ node.permalink }}">{{ node.title }}</a>
</span>
<span class="eventlisting-eventdate">{{ node.date | date: "%d %B %Y" }}</span>
<span class="eventlisting-eventlocation">{{ node.location }}</span>
</p>
<p class="eventlisting-eventdescription">{{ node.description }}</p>
{% if node.series %}
<p class="eventlisting-seriestitle">
An event in the <a href="{{ site.baseurl }}{{ node.serieslink }}">{{ node.series }}</a> series.
</p>
{% endif %}
</div>
{% endif %}
{% endif %}
{% endfor %}
<h2>OKF past events</h2>
{% assign eventlist = site.pages | where: 'layout', 'event' | sort: "date" | reverse %}
{% capture now %}{{'now' | date: '%s' | plus: 0 %}}{% endcapture %}
{% for node in eventlist %}
{% capture date %}{{node.date | date: '%s' | plus: 0 %}}{% endcapture %}
{% if date < now %}
{% if node.layout == 'event' %}
<div class="eventlisting">
<p class="eventlisting-eventdateandtitle">
<span class="eventlisting-eventtitle">
<a href="{{ site.baseurl }}{{ node.permalink }}">{{ node.title }}</a>
</span>
<span class="eventlisting-eventdate">{{ node.date | date: "%d %B %Y" }}</span>
<span class="eventlisting-eventlocation">{{ node.location }}</span>
</p>
<p class="eventlisting-eventdescription">{{ node.description }}</p>
{% if node.series %}
<p class="eventlisting-seriestitle">
An event in the <a href="{{ site.baseurl }}{{ node.serieslink }}">{{ node.series }}</a> series.
</p>
{% endif %}
</div>
{% endif %}
{% endif %}
{% endfor %}