hackertours/themes/hackertours/layouts/_partials/first-page-image.html
Vincent Mahnke 3471d2487d Use a list view on the desktop instead of calendar
| Desktop | Mobile |
| --- | --- |
| ![image](/attachments/5887a605-9fd8-42aa-bbdc-ea9259553eba) | ![image](/attachments/0b68bfa2-a3a7-4f7f-af46-e6217a07a586) |

Co-authored-by: stb <stb@noreply.git.hamburg.ccc.de>
Reviewed-on: #73
2026-11-14 08:47:08 +01:00

19 lines
994 B
HTML

{{- $result := dict -}}
{{- with findRESubmatch `!\[([^\]]*)\]\(\s*<?([^\s)>]+)|\{\{<\s*gallery-image\s([^}]*)>\}\}` .RawContent 1 -}}
{{- $alt := index . 0 1 -}}
{{- $dest := index . 0 2 -}}
{{- $credit := "" -}}
{{- with index . 0 3 -}}
{{- $dest = "" -}}
{{- $alt = "" -}}
{{- with findRESubmatch "\\bsrc=(?:\"([^\"]*)\"|`([^`]*)`)" . 1 }}{{ $dest = or (index . 0 1) (index . 0 2) }}{{ end -}}
{{- with findRESubmatch "\\balt=(?:\"([^\"]*)\"|`([^`]*)`)" . 1 }}{{ $alt = or (index . 0 1) (index . 0 2) }}{{ end -}}
{{- with findRESubmatch "\\bcredit=(?:\"([^\"]*)\"|`([^`]*)`)" . 1 }}{{ $credit = or (index . 0 1) (index . 0 2) }}{{ end -}}
{{- end -}}
{{- $resource := false -}}
{{- if not (findRE `^https?://` $dest) -}}
{{- $resource = or ($.Resources.Get (strings.TrimPrefix "./" $dest)) (resources.Get $dest) -}}
{{- end -}}
{{- $result = dict "alt" $alt "credit" $credit "dest" $dest "resource" $resource -}}
{{- end -}}
{{- return $result -}}