Skip to content
Snippets Groups Projects
map.html 814 B
Newer Older
Olivia206's avatar
Olivia206 committed
{{ $logo_index := .logo_index }}

<div class="map" id="map">
  {{- range .partners }}
Olivia206's avatar
Olivia206 committed
  {{ . }}
Olivia206's avatar
Olivia206 committed
    {{ if .slug }}
      {{ with (site.GetPage (printf "/organizations/%s" .slug )) }}
        {{ template "partner" (dict 
            "title" .Title
            "url" .Permalink
            "logo" (index .Params $logo_index)
Olivia206's avatar
Olivia206 committed
            "latitude" .Params.contact_details.geolocation.latitude
            "longitude" .Params.contact_details.geolocation.longitude
Olivia206's avatar
Olivia206 committed
          )}}
      {{ end }}
    {{ else }}
      {{ template "partner" (dict 
          "title" .name
          "url" .url
          "external" true
          "logo" .logo
Olivia206's avatar
Olivia206 committed
          "latitude" .Params.contact_details.geolocation.latitude
          "longitude" .Params.contact_details.geolocation.longitude
Olivia206's avatar
Olivia206 committed
        )}}
    {{ end }}
  {{ end -}}
Olivia206's avatar
Olivia206 committed
</div>