summaryrefslogtreecommitdiff
path: root/templates/macros.html
diff options
context:
space:
mode:
authorVanja Cosic <1070957+vanjacosic@users.noreply.github.com>2023-10-26 17:45:01 +0200
committerVanja Cosic <1070957+vanjacosic@users.noreply.github.com>2023-10-26 17:45:01 +0200
commite642d1628ce3822e86f0731641034b88ad6e0948 (patch)
treec8399c5d72b8b9a6f7673e7a82ba745272dd76c7 /templates/macros.html
parent2316c908a66d44aa0f115777236b416166a9d3d5 (diff)
downloadcph-rust-website-e642d1628ce3822e86f0731641034b88ad6e0948.zip
Initial implementation of event pages
Diffstat (limited to 'templates/macros.html')
-rw-r--r--templates/macros.html42
1 files changed, 42 insertions, 0 deletions
diff --git a/templates/macros.html b/templates/macros.html
new file mode 100644
index 0000000..47b07e2
--- /dev/null
+++ b/templates/macros.html
@@ -0,0 +1,42 @@
+{% macro event_attributes(event) %}
+<dl>
+ {% if event.url %}
+ <dt>
+ Event link
+ </dt>
+ <dd>
+ <a href="{{ event.url }}">{{ event.title}} on Meetup.com</a>
+ </dd>
+ {% endif %}
+
+ <dt>
+ Date
+ </dt>
+ <dd>
+ {% if event.date %}
+ <time datetime="{{ event.date }}">{{ event.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time>
+ {% else %}
+ (No date found)
+ {% endif %}
+ </dd>
+
+ <dt>
+ Venue
+ </dt>
+ <dd>
+ {% if event.venue %}
+ {{ event.venue }} – {% endif %}
+ {% if event.address %}{{ event.address }}
+ {% else %}
+ (No venue)
+ {% endif %}
+ </dd>
+
+ {% if event.content -%}
+ <dt>Description</dt>
+ <dd>
+ <blockquote>{{ event.content | safe }}</blockquote>
+ </dd>
+ {% endif %}
+</dl>
+{% endmacro event_attributes %} \ No newline at end of file