summaryrefslogtreecommitdiff
path: root/templates/index.html
blob: 58223230df53a9b8453b9e324fa4689b897492e3 (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
{% extends "base.html" %}

{% block sidebar %}
        <aside class="menu">
            {% set events = load_data(path="events.toml") %}
            
            {%- set nextEvent = events.upcoming | last %}
            {%- if nextEvent -%}
            <h2>Next event</h2>
            
            {% if nextEvent.url %}
                <a class="title" href="{{ nextEvent.url }}">{{ nextEvent.title }}</a>
                {% else %}
                <span class="title">{{ nextEvent.title }}</span>
            {% endif -%}
            {% if nextEvent.date %}
                <time datetime="{{ nextEvent.date }}">{{ nextEvent.date | date(format="%A, %e %B at %H:%M", timezone="Europe/Berlin") }}</time>
                {% else %}
                <div>(No date announced)</div>
            {% endif -%}
            {%- if not nextEvent.url -%}<div>(Link coming soon)</div>{%- endif -%}
            {% endif %}

            {%- set recentEvent = events.recent | first %}
            {%- if recentEvent -%}
            <h2>Recent event</h2>
            
            {% if recentEvent.url %}
                <a class="title" href="{{ recentEvent.url }}">{{ recentEvent.title }}</a>
                {% else %}
                <span class="title">{{ recentEvent.title }}</span>
            {% endif -%}
            {% if recentEvent.date %}
                <time datetime="{{ recentEvent.date }}">{{ recentEvent.date | date(format="%A, %e %B", timezone="Europe/Berlin") }}</time>
                {% else %}
                <div>(No date found)</div>
            {% endif -%}
            {%- if not recentEvent.url -%}<div>(No link found)</div>{%- endif -%}
            {% endif %}
            
            <h2>Links</h2>
            {% for menu in config.extra.menu %}
            <a class="button" {% if menu.url %}href="{{ menu.url | safe }}"{% endif %}>{{ menu.title }}</a>
            {%- endfor %}
        </aside>
{% endblock sidebar %}

{% block content %}
{{ section.content | safe }}
{% endblock content %}