Omphaloskepsis-2/layouts/partials/util/get_location_leaf_nodes.html.tmpl

19 lines
453 B
Cheetah
Raw Normal View History

2024-04-02 19:36:21 +00:00
<!--
Returns all locations from `data/locations.json`.
@params locations dict<dict>
@returns dict<dict>
-->
{{- $locations := ( dict ) -}}
{{- range $k, $v := . -}}
{{- if ( isset $v "lat" ) -}}
{{- $locations = merge $locations ( dict $k $v ) -}}
{{- else -}}
{{- $locations = merge $locations ( partial "util/get_location_leaf_nodes.html.tmpl" . ) -}}
{{- end -}}
{{- end -}}
{{- return $locations -}}