diff options
author | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-10-27 14:58:01 +0200 |
---|---|---|
committer | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-10-27 14:58:01 +0200 |
commit | e028ac38509a954a7d8808962dd57d400142ef64 (patch) | |
tree | 64014b887307d9de19ba75b8cb4cd481934c3a74 /templates | |
parent | 3e5ee8db4a1a2344118fcf78840151210325cd9f (diff) | |
download | cph-rust-website-e028ac38509a954a7d8808962dd57d400142ef64.zip |
Clean up event styles
Diffstat (limited to 'templates')
-rw-r--r-- | templates/event-page.html | 41 | ||||
-rw-r--r-- | templates/events.html | 7 | ||||
-rw-r--r-- | templates/macros.html | 6 |
3 files changed, 29 insertions, 25 deletions
diff --git a/templates/event-page.html b/templates/event-page.html index d807e31..44911f7 100644 --- a/templates/event-page.html +++ b/templates/event-page.html @@ -2,27 +2,30 @@ {% import "macros.html" as macros %} {% block content %} -<h1 class="title"> - {{ page.title }} -</h1> +<article> + <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 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 %} + {% 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 }} + {% if event %} + <details> + <summary> + <h3>Details about this event</h3> + </summary> + <div> + {{ macros::event_attributes(event=event) }} + </div> + </details> + {% else %} + No data found for this event. + {% endif %} + {{ page.content | safe }} +</article> {% endblock content %}
\ No newline at end of file diff --git a/templates/events.html b/templates/events.html index 2ee2e6b..6a34d22 100644 --- a/templates/events.html +++ b/templates/events.html @@ -47,14 +47,15 @@ </a> {% else %} <article> - <details> + <details {% if group == 'upcoming' %}open{% endif %}> <summary> <h3> {{ event.title }} </h3> </summary> - - {{ macros::event_attributes(event=event) }} + <div> + {{ macros::event_attributes(event=event) }} + </div> </details> </article> {% endif %} diff --git a/templates/macros.html b/templates/macros.html index 47b07e2..7e5acb1 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -2,7 +2,7 @@ <dl> {% if event.url %} <dt> - Event link + Signup </dt> <dd> <a href="{{ event.url }}">{{ event.title}} on Meetup.com</a> @@ -14,9 +14,9 @@ </dt> <dd> {% if event.date %} - <time datetime="{{ event.date }}">{{ event.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time> + <time datetime="{{ event.date }}">{{ event.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time> {% else %} - (No date found) + (No date found) {% endif %} </dd> |