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",
getLocalized: function(item) {
if (typeof item === "string") return item;
return item[this.ctx.lang];
},
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 }}">
{{ toDate(date).toLocaleDateString(lang, { weekday: 'long', month: 'short', day: 'numeric' }) }}
</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-09-27 15:36:08 +02:00
{% if event.livestream %}{% icon "solid:video", title="Livestream" %}{% endif %}
2024-09-27 09:57:38 +02:00
{{ getLocalized(event.title) }}
</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-09-27 16:32:04 +02:00
<p>{{ getLocalized(event.description) | 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-09-27 16:32:04 +02:00
{{ getLocalized(event.annotation) | 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-09-27 16:32:04 +02:00
{{ getLocalized(event.location) | 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 %}