summaryrefslogtreecommitdiff
path: root/templates/shortcodes
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/shortcodes
parent2316c908a66d44aa0f115777236b416166a9d3d5 (diff)
downloadcph-rust-website-e642d1628ce3822e86f0731641034b88ad6e0948.zip
Initial implementation of event pages
Diffstat (limited to 'templates/shortcodes')
-rw-r--r--templates/shortcodes/get_event.html18
-rw-r--r--templates/shortcodes/list_events.html (renamed from templates/shortcodes/list_events.md)3
-rw-r--r--templates/shortcodes/slides_link.html5
-rw-r--r--templates/shortcodes/youtube.html11
4 files changed, 37 insertions, 0 deletions
diff --git a/templates/shortcodes/get_event.html b/templates/shortcodes/get_event.html
new file mode 100644
index 0000000..1526685
--- /dev/null
+++ b/templates/shortcodes/get_event.html
@@ -0,0 +1,18 @@
+{% set meetups = load_data(path="events.toml") %}
+
+{% if meetups['recent'] %}
+## {{ 'recent' | capitalize }}
+
+{% for item in meetups['recent'] %}
+### {{ item.title }}
+
+{% if item.event_page %}yo{% endif %}
+
+{% if item.url %}**Link:** [Meetup.com]({{ item.url }}){% endif %}
+**Date:** {% if item.date %}<time datetime="{{ item.date }}">{{ item.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time> {% else %}(No date found) {% endif %}
+**Venue:** {% if item.venue %}{{ item.venue }} – {% endif %}{% if item.address %}{{ item.address }} {% else %}(No venue) {% endif %}
+{% if item.content -%}**Description:**<blockquote>{{ item.content | safe }}</blockquote>{% endif %}
+
+{% endfor %}
+{% endif %}
+
diff --git a/templates/shortcodes/list_events.md b/templates/shortcodes/list_events.html
index 1b887c7..aa59de8 100644
--- a/templates/shortcodes/list_events.md
+++ b/templates/shortcodes/list_events.html
@@ -6,6 +6,8 @@
{% for item in meetups[group] %}
### {{ item.title }}
+{% if item.event_page %}yo{% endif %}
+
{% if item.url %}**Link:** [Meetup.com]({{ item.url }}){% endif %}
**Date:** {% if item.date %}<time datetime="{{ item.date }}">{{ item.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time> {% else %}(No date found) {% endif %}
**Venue:** {% if item.venue %}{{ item.venue }} – {% endif %}{% if item.address %}{{ item.address }} {% else %}(No venue) {% endif %}
@@ -13,3 +15,4 @@
{% endfor %}
{% endif %}
+
diff --git a/templates/shortcodes/slides_link.html b/templates/shortcodes/slides_link.html
new file mode 100644
index 0000000..49271ff
--- /dev/null
+++ b/templates/shortcodes/slides_link.html
@@ -0,0 +1,5 @@
+<a
+class="button"
+href="{{url}}">
+ {{title}}
+</a> \ No newline at end of file
diff --git a/templates/shortcodes/youtube.html b/templates/shortcodes/youtube.html
new file mode 100644
index 0000000..573e269
--- /dev/null
+++ b/templates/shortcodes/youtube.html
@@ -0,0 +1,11 @@
+<div class="youtube-container">
+ <iframe
+ src="https://www.youtube-nocookie.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}"
+ frameborder="0"
+ title="YouTube embed"
+ webkitallowfullscreen
+ mozallowfullscreen
+ allowfullscreen
+ >
+ </iframe>
+</div>