diff options
author | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-10-26 17:45:01 +0200 |
---|---|---|
committer | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-10-26 17:45:01 +0200 |
commit | e642d1628ce3822e86f0731641034b88ad6e0948 (patch) | |
tree | c8399c5d72b8b9a6f7673e7a82ba745272dd76c7 /templates/event-page.html | |
parent | 2316c908a66d44aa0f115777236b416166a9d3d5 (diff) | |
download | cph-rust-website-e642d1628ce3822e86f0731641034b88ad6e0948.zip |
Initial implementation of event pages
Diffstat (limited to 'templates/event-page.html')
-rw-r--r-- | templates/event-page.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/templates/event-page.html b/templates/event-page.html new file mode 100644 index 0000000..d807e31 --- /dev/null +++ b/templates/event-page.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} + +{% block content %} +<h1 class="title"> + {{ page.title }} +</h1> + +{% set meetups = load_data(path="events.toml") %} +{% set upcoming = meetups['upcoming'] %} +{% set all_events = meetups['recent'] | concat(with=upcoming) %} + +{% set event = all_events | filter(attribute="title", value=page.title) | first %} + +{% if event %} + <details> + <summary> + <h3>Details about this event</h3> + </summary> + {{ macros::event_attributes(event=event) }} + </details> +{% else %} + No data found for this event. +{% endif %} + +{{ page.content | safe }} + +{% endblock content %}
\ No newline at end of file |