{{- $intro := $.Page.Param "event.weekly.intro" }}
{{- if not $intro }}
{{- errorf "missing value for 'event.weekly.intro': %s" .Position }}
{{- end }}
{{- $weekday := $.Page.Param "event.weekly.weekday" }}
{{- if not $weekday }}
{{- errorf "missing value for 'event.weekly.weekday': %s" .Position }}
{{- end }}
{{- $begin := $.Page.Param "event.weekly.begin" }}
{{- if not $begin }}
{{- errorf "missing value for 'event.weekly.begin': %s" .Position }}
{{- end }}
{{- $finish := $.Page.Param "event.weekly.finish" }}
{{- $interval := $.Page.Param "event.weekly.interval" }}
{{- $annotation := $.Page.Param "event.weekly.annotation" }}
{{- $link := $.Page.Param "event.weekly.link" }}
{{- $remote_url := $.Page.Param "event.weekly.remote_url" }}
{{- $matrix_channel := $.Page.Param "event.weekly.matrix_channel" }}
<p>
  {{ $intro }}
</p>
<dl>
  <dt>Termin</dt>
  <dd>
    Jeden
    {{- with $interval }}
      {{ . }} {{ $weekday }} im Monat
    {{- else }}
      {{ $weekday }}
    {{- end }}
    {{- with $begin }}
    von {{ . }} Uhr bis
    {{- with $finish }}
      {{ . }} Uhr
    {{- else }}
      open end
    {{- end }}
    {{- end }}
  </dd>
  {{- with $annotation }}
  <dd>
    <small>({{ . }})</small>
  </dd>
  {{- end }}
  {{- with $remote_url }}
  <dt>Remote Treffen</dt>
  <dd>
    Das Event findet virtuell statt: <a href="{{ . }}">{{ . }}</a>
  </dd>
  {{- end }}
  {{- with $matrix_channel }}
  <dt>Matrix Channel</dt>
  <dd>
      <a href="https://matrix.to/#/{{ . }}">{{ . }}</a>
  </dd>
  {{- end }}
  {{- with $link }}
  <dt>Website</dt>
  <dd>
      <a href="{{ . }}">{{ . }}</a>
  </dd>
  {{- end }}
</dl>
<p>
</p>
