Omphaloskepsis-2/layouts/partials/util/get_location_by_index.html

15 lines
493 B
HTML
Raw Normal View History

2024-04-02 19:36:21 +00:00
{{- $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 -}}