diff options
author | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-04-03 14:31:13 +0200 |
---|---|---|
committer | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-04-03 14:31:13 +0200 |
commit | e0615a7638c6f86b3f059f1d900376d315fbfeea (patch) | |
tree | 290e24a5eb237371326b43b98f58d1c6c811e45b /templates/index.html | |
download | cph-rust-website-e0615a7638c6f86b3f059f1d900376d315fbfeea.zip |
Initial commit (the draft version from February)
Diffstat (limited to 'templates/index.html')
-rw-r--r-- | templates/index.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..5822323 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,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 %}
\ No newline at end of file |