blob: 6a34d2259137601a465b4fc9201f3c2225bd9fd7 (
plain)
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
|
{% extends "base.html" %}
{% import "macros.html" as macros %}
{% block sidebar %}
{% set toc = ['upcoming', 'recent', 'past'] %}
<aside class="toc">
{% if section.toc %}{% set toc = section.toc %}{% elif page.toc %}{% set toc = page.toc %}{% endif %}
{% if toc %}
<div class="toc-sticky">
<div class="toc-item">
<a href="#events">Events</a>
</div>
{% for h in toc %}
<div class="toc-item-child">
<a href="#{{h}}">{{ h | capitalize }}</a>
</div>
{% endfor %}
</div>
{% endif %}
</aside>
{% endblock sidebar %}
{% block content %}
<h1 class="title">
{{ section.title }}
</h1>
{{ section.content | safe }}
{% set groups = ['upcoming', 'recent', 'past'] %}
{% set meetups = load_data(path="events.toml") %}
{% for group in groups %}
{% if meetups[group] %}
<section>
<h2 id="{{group}}">{{ group | capitalize }}</h2>
{% for event in meetups[group] %}
{% set event_page = section.pages | filter(attribute="title", value=event.title) | first%}
{% if event_page %}
<a class="event-page-link" href="../events/{{ event_page.slug }}">
<h3>
{{ event_page.title }}
</h3>
</a>
{% else %}
<article>
<details {% if group == 'upcoming' %}open{% endif %}>
<summary>
<h3>
{{ event.title }}
</h3>
</summary>
<div>
{{ macros::event_attributes(event=event) }}
</div>
</details>
</article>
{% endif %}
{% endfor %}
</section>
{% endif %}
{% endfor %}
{% endblock content %}
|