-
Notifications
You must be signed in to change notification settings - Fork 0
/
events.html
70 lines (61 loc) · 2.75 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
---
layout: default
title: upcoming events.
description: a list of our events
portfolio_title: events portfolio.
add-js: future_events.js
---
<header class="min-[340px]:mx-8 my-28">
<h1>{{ page.title }}</h1>
</header>
{% assign all_events = site.posts | where: "categories", "events" %}
{% assign portfolio_events = site.posts | where: "tags", "portfolio" %}
{% capture now_seconds %}{{'now' | date: '%s'}}{% endcapture %}
<div class="flex justify-center mb-28">
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-8 mx-8">
{% for event in all_events %}
{% capture event_seconds %}{{event.date | date: '%s'}}{% endcapture %}
{% capture event_date %}{{event.date | date: '%Y-%m-%d'}}{% endcapture %}
{% if event.start_date %}
{% capture date_string %}{{event.start_date | date: "%d.%m.%Y"}} - {{event.date | date: "%d.%m.%Y"}}{% endcapture %}
{% else %}
{% capture date_string %} {{event.date | date: "%d.%m.%Y"}}{% endcapture %}
{% endif %}
{% if event_seconds >= now_seconds %}
<div future-date="{{ event_date }}" class="w-full max-w-64 lg:w-64 links-without-underline">
<div class="font-prachtsaal text-right text-sm">{{ date_string }}</div>
<a href="{{ event.url | relative_url }}" class="flex flex-col">
{% if event.main_image %}
<img class="w-64" src="{{ event.main_image | relative_url }}">
{% endif %}
<div class="font-prachtsaal font-bold text-lg">{{ event.title }}</div>
<hr class="border-1 border-black">
<div class="font-prachtsaal">{{ event.subtitle }}</div>
<div class="mt-2">{{ event.description }}</div>
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="m-8 bg-black text-white">
<header class="py-14 min-[400px]:px-8">
<h1>{{ page.portfolio_title }}</h1>
</header>
<div class="flex justify-center mb-28">
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-8 mx-8 mb-14">
{% for event in portfolio_events %}
<div class="w-full max-w-64 lg:w-64 links-without-underline">
<div class="font-prachtsaal text-right text-sm">{{ event.date | date: "%d.%m.%Y" }}</div>
<a href="{{ event.url | relative_url }}">
{% if event.main_image %}
<img class="w-64" src="{{ event.main_image | relative_url }}">
{% endif %}
<div class="font-prachtsaal font-bold text-lg">{{ event.title }}</div>
<div class="font-prachtsaal">{{ event.subtitle }}</div>
</a>
</div>
{% endfor %}
</div>
</div>
</div>