Newer
Older
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{% include top.html %}
<body>
{% include header.html %}
<main>
{% include title_image.html %}
<section class="events-container">
{% comment %}
Events are sorted depending whether they are in the past or in the future.
Upcoming events are sorted from near future to far future.
Past events are sorted most recent to least recent.
In both cases the list is a truncated version of the complete events list,
where the pivot is the current date.
If no past events are available a placeholder text will be used instead.
Example:
P0 P1 P2 today F0 F1 (events)
*---*---*-----*----*---*---> (time)
will yield the event order (top to bottom): F0, F1, (separator) P2, P1, P0.
{% endcomment %}
{% assign sorted_events = site.events | sort: "start.date" %}
{% assign sorted_events_reversed = site.events | sort: "start.date" | reverse %}
{% assign today = "now" | date: "%Y-%m-%d" %}
<h1 id="upcoming_events" class="events-section-heading">Upcoming Events</h1>
<div class="rss-events-container">
<a class="rss-events-button" href="{{ '/feed/events.xml' | relative_url }}"
title="subscribe to feed"
type="application/atom+xml"
download>
<i class="fas fa-rss"></i>
</a>
</div>
{% assign has_upcoming_events = false %}
{% for event in sorted_events %}
{% if event.start.date < today %}
{% continue %}
{% endif %}
{% assign has_upcoming_events = true %}
<article class="list-entry">
<div class="preview">
<h1>
<a href="{{ event.url | relative_url }}">
{{ event.title }}
</a>
</h1>
{% if event.excerpt_separator != '' %}
<div class="excerpt-content">
{{ event.excerpt }}
</div>
{% else %}
<div class="no-excerpt-content">
{{ event.content }}
</div>
{% endif %}
<a href="{{ event.url | relative_url }}" >
<span> more… </span>
</a>
</div>
<div class="digest-container">
{% include event_digest.html event=event %}
</div>
</article>
{% endfor %}
{% if has_upcoming_events == false %}
<article class="list-entry">
<p>
There are no upcoming events right now ... stay tuned.
</p>
</article>
{% endif %}
<hr class="horizontal-line across_whole_page" />
<h1 id="past_events" class="events-section-heading">Past Events</h1>
{% assign has_past_events = false %}
{% for event in sorted_events_reversed %}
{% if event.start.date >= today %}
{% continue %}
{% endif %}
{% assign has_past_events = true %}
<article class="list-entry">
<div class="preview">
<h1>
<a href="{{ event.url | relative_url }}">
{{ event.title }}
</a>
</h1>
{% if event.excerpt_separator != '' %}
<div class="excerpt-content">
{{ event.excerpt }}
</div>
{% else %}
<div class="no-excerpt-content">
{{ event.content }}
</div>
{% endif %}
<a href="{{ event.url | relative_url }}" >
<span> more… </span>
</a>
</div>
<div class="digest-container">
{% include event_digest.html event=event %}
</div>
</article>
{% endfor %}
{% if has_past_events == false %}
<article class="list-entry">
<p>
There are no past events right now.
</p>
</article>
{% endif %}
</section>
</main>
{% include footer.html %}
</body>
</html>