ticker/ticker-serve/templates/index.html

73 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Ticker</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width"/>
<link rel="stylesheet" title="Style" type="text/css" href="static/style.css"/>
<link rel="icon" type="image/png" href="static/favicon.png"/>
</head>
<body>
{% for day in days.iter() %}
<div>
<h2>
<span class="date {{
format!("wd{}", day.date.weekday().num_days_from_monday())
}}">
<span class="day">
{{ day.date.day() }}
</span>
<span class="month">
{{ day.month }}
</span>
</span>
<span class="weekday">
{{ day.weekday }}
</span>
</h2>
{% for (e, url, color) in day.events.iter() %}
<article class="event"
itemprop="event" itemscope=true itemtype="https://schema.org/Event"
style="border-left: 1.5rem solid {{ color }}">
<p class="time">
{% if e.recurrence %}
<span class="recurrence" title="Regelmässige Veranstaltung"></span>
{% endif %}
<time class="dtstart" itemprop="startDate"
datetime="{{
Local.from_local_datetime(e.dtstart).unwrap().format("%Y-%m-%dT%H:%M:%S%:z")
}}">
{{ e.dtstart.format("%H:%M") }}
</time>
</p>
{% if let Some(url) = url %}
<h3 itemprop="name">
<a href="{{ url }}" itemprop="url">
{{ e.summary }}
</a>
</h3>
{% else %}
<h3 itemprop="name">{{ e.summary }}</h3>
{% endif %}
<p class="location" itemprop="location">
{% if let Some(location) = e.location %}
{{ location }}
{% endif %}
</p>
</article>
{% endfor %}
</div>
{% endfor %}
<footer>
<p>
Ein Projekt des
<a href="https://www.c3d2.de/">"C3D2"</a>
-
<a href="https://gitea.c3d2.de/astro/ticker">Code</a>
</p>
</footer>
</body>
</html>