ese-website/_includes/program.njk

76 lines
2.1 KiB
Plaintext
Raw Normal View History

2024-09-26 15:39:47 +02:00
---js
{
layout: "page.njk",
toDate: function(dateStr) {
return new Date(dateStr);
}
}
---
{{ content | safe }}
{% for date, events in program %}
2024-09-27 09:57:38 +02:00
<section class="program-date">
2024-09-26 15:39:47 +02:00
<h2 id="{{ date }}">
2024-10-04 17:16:16 +02:00
<a class="permalink" href="#{{date}}">
{{ toDate(date).toLocaleDateString(lang, { weekday: 'long', month: 'short', day: 'numeric' }) }}
</a>
2024-09-26 15:39:47 +02:00
</h2>
<ul>
{% for event in events %}
<li class="timeslot">
2024-09-27 09:57:38 +02:00
<div class="timeslot-container">
<h3 id="{{date}}_{{loop.index}}">
2024-10-04 17:16:16 +02:00
<a class="permalink" href="#{{date}}_{{loop.index}}">
{% if event.livestream %}{% icon "solid:video", title="Livestream" %}{% endif %}
{{ event.title | localized }}
</a>
2024-09-27 09:57:38 +02:00
</h3>
2024-09-26 15:39:47 +02:00
2024-09-27 09:57:38 +02:00
<div class="timeslot-time">
<span class="start">{{ event.start }}</span>
{% if event.end %}
<span class="end"> {{ event.end }}</span>
{% endif %}
<span class="full">{{ event.start }}{{ " " + event.end if event.end }}</span>
</div>
2024-09-26 15:39:47 +02:00
2024-10-04 13:54:40 +02:00
<p>{{ event.description | localized | mdInline | safe }}</p>
2024-09-26 15:39:47 +02:00
2024-09-27 09:57:38 +02:00
{% if event.annotation %}
<p class="annotation">
2024-09-27 15:36:08 +02:00
{% icon "solid:exclamation", title=("Notice" if lang == "en" else "Hinweis") %}
2024-10-04 13:54:40 +02:00
{{ event.annotation | localized | mdInline | safe }}
2024-09-27 09:57:38 +02:00
</p>
{% endif %}
2024-09-26 15:39:47 +02:00
2024-09-27 09:57:38 +02:00
{% if event.location %}
<p class="location">
2024-09-27 15:36:08 +02:00
{% icon "solid:location-dot", title=("Location" if lang == "en" else "Veranstaltungsort") %}
2024-10-04 13:54:40 +02:00
{{ event.location | localized | mdInline | safe }}
2024-09-27 09:57:38 +02:00
</p>
{% endif %}
2024-09-26 15:39:47 +02:00
2024-09-27 09:57:38 +02:00
{% if event.checkin_link %}
<a class="btn"
{% if event.checkin_link.startsWith("http") %}
href="{{ event.checkin_link }}"
target="_blank"
rel="noreferrer"
{% else %}
href="{{ event.checkin_link | locale_url }}"
{% endif %}
>
Check-in
</a>
2024-09-26 15:39:47 +02:00
{% endif %}
2024-09-27 09:57:38 +02:00
</div>
2024-09-26 15:39:47 +02:00
</li>
{% endfor %}
</ul>
2024-09-27 09:57:38 +02:00
</section>
2024-09-26 15:39:47 +02:00
{% endfor %}
{% css %}
2024-09-27 09:57:38 +02:00
{% include "program.css" %}
2024-09-26 15:39:47 +02:00
{% endcss %}