-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlatestEventCard.html
More file actions
30 lines (30 loc) · 1.23 KB
/
latestEventCard.html
File metadata and controls
30 lines (30 loc) · 1.23 KB
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
{% assign events = site.events | sort: "event-date" %}
<a href="/register/">
<div class="card">
<div class="card-content">
<div class="media">
<div class="media-content">
{% capture currentDate %}
{{ site.time | date: '%F' }}
{% endcapture %}
{%capture eventdate %}
{{ events.last.event-date | date: '%F' }}
{% endcapture %}
{% if eventdate >= currentDate %}
<p class="title is-4">Upcoming Event</p>
{% else %}
<p class="title is-4">Last Event</p>
{% endif %}
<p class="title is-5">{{ events.last.title }}</p>
</div>
</div>
<div class="content">
<p>{{ events.last.description }}</p>
</div>
</div>
<footer class="card-footer">
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
<time class="is-size-7" datetime="{{ events.last.event-date }}">{{ events.last.event-date | date: date_format }}</time>
</footer>
</div>
</a>