All checks were successful
/ build (push) Successful in 15s
Reviewed-on: #151 Reviewed-by: dario <dario@noreply.git.hamburg.ccc.de>
31 lines
1.3 KiB
HTML
31 lines
1.3 KiB
HTML
{{- index .Site.Data "calendar.json" }}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td>Datum</td>
|
|
<td>Titel</td>
|
|
<td>Ort</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{- range first 7 (sort $.Site.Data.calendar "dtstart" ) }}
|
|
{{- if eq ._type "vevent"}}
|
|
<tr>
|
|
{{- $start := time .dtstart }}
|
|
<td style="font-variant-numeric: tabular-nums;">{{- if eq .status "CANCELLED" }}<del>{{- end }}{{ time.Format "Mon, 2006-01-02 15:04" $start.Local }}{{- if eq .status "CANCELLED" }}</del>{{- end }}</td>
|
|
{{- $potentialUrl := index (findRE `https?://\S*` .description 1) 0 }}
|
|
{{- if eq $potentialUrl nil }}
|
|
<td>{{- if eq .status "CANCELLED" }}<del>{{- end }}{{ .summary }}{{- if eq .status "CANCELLED" }}</del>{{- end }}</td>
|
|
{{- else }}
|
|
<td><a href="{{ $potentialUrl }}">{{- if eq .status "CANCELLED" }}<del>{{- end }}{{ .summary }}{{- if eq .status "CANCELLED" }}</del>{{- end }}</a></td>
|
|
{{- end }}
|
|
{{- if eq .location "Z9" }}
|
|
<td><a href="https://wiki.hamburg.ccc.de/club:z9:start">{{- if eq .status "CANCELLED" }}<del>{{- end }}Z9{{- if eq .status "CANCELLED" }}</del>{{- end }}</a></td>
|
|
{{- else }}
|
|
<td>{{- if eq .status "CANCELLED" }}<del>{{- end }}{{ .location }}{{- if eq .status "CANCELLED" }}</del>{{- end }}</td>
|
|
{{- end }}
|
|
</tr>
|
|
{{- end }}
|
|
{{- end }}
|
|
</tbody>
|
|
</table>
|