summaryrefslogtreecommitdiff
path: root/templates/index.html
blob: 4e66f89e6ebb1d13289463944553e58ee3f7f3a0 (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
{% extends "base.html" %}
{% import "macros.html" as macros %}

{% block content %}
<aside>
    <h2>Updates</h2>
    {% set events = load_data(path="events.toml") %}
    
    {%- set nextEvent = events.upcoming | last %}
    {%- if nextEvent -%}
    <p>
        Next event:
        <a href="/events">{{ nextEvent.title }}</a>

        {% if nextEvent.date %}
            <time datetime="{{ nextEvent.date }}">{{ nextEvent.date | date(format="%A, %e %B", timezone="Europe/Berlin") }}</time>
        {% else %}
            <i>To be announced</i>
        {% endif -%}
    </p>
    {% endif %}

    {%- set recentEvent = events.recent | first %}
    {%- if recentEvent -%}
    <p>
        Recent event:
        <a href="/events">{{ recentEvent.title }}</a>

        {% if recentEvent.date %}
            <time datetime="{{ recentEvent.date }}">{{ recentEvent.date | date(format="%A, %e %B", timezone="Europe/Berlin") }}</time>
        {% endif -%}
    </p>
    {% endif %}
</aside>

<article>
    {{ section.content | safe }}
</article>
{% endblock content %}

{% block footer %}
    {{ macros::last_update() }}
{% endblock footer %}