Omphaloskepsis-2/layouts/partials/util/get_location_by_index.html
2024-04-02 20:36:21 +01:00

14 lines
493 B
HTML

{{- $locations := .Params.location }}
{{- $location := .Params.location }}
{{- range $k, $v := $locations -}}
{{- if ( isset $v "lat" ) -}}
{{- partialCached "util/get_location_by_index.html" ( dict "locations" $v "location" $location ) $location -}}
{{- else if ( eq $k $location ) -}}
{{- with $v -}}
{{- return . -}}
{{- else -}}
{{- warnf "Location %q has no co-ordinates set" $k -}}
{{- end -}}
{{- end -}}
{{- end -}}