update
This commit is contained in:
parent
187900fd5b
commit
1fd9adcb52
23 changed files with 1800 additions and 98 deletions
|
@ -30,15 +30,16 @@
|
|||
}).addTo(map);
|
||||
|
||||
var latLons = [];
|
||||
{{ range . }}
|
||||
{{ with ( index $.Site.Data.locations . ) }}
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
latLons.push([{{ .lat }}, {{ .lon }}]);
|
||||
{{ else }}
|
||||
{{ erroridf "missing-lat-lon" "Could not find lat-lon for %q (%q)" . $.File.Path }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $locations := partialCached "util/get_location_leaf_nodes.html.tmpl" $.Site.Data.locations -}}
|
||||
{{- range . -}}
|
||||
{{- with ( index $locations ( replaceRE `, [A-Z]+` "" . ) ) -}}
|
||||
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
|
||||
latLons.push([{{ .lat }}, {{ .lon }}]);
|
||||
{{- else -}}
|
||||
{{- erroridf "missing-lat-lon" "Could not find lat-lon for %q (%q)" . $.File.Path -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
map.fitBounds(latLons);
|
||||
if (map.getZoom() < 10) map.setZoom(10);
|
||||
</script>
|
||||
|
@ -112,10 +113,19 @@
|
|||
</div>
|
||||
{{ with .Resources.GetMatch .Params.featured_image }}
|
||||
<p class="attr">
|
||||
{{ if .Params.attrlink }}<a href="{{ .Params.attrlink }}" target="_blank" rel="noopener">{{ end }}
|
||||
{{- .Params.Attr | safeHTML -}}
|
||||
{{ if .Params.attrlink }}</a>{{ end }}
|
||||
{{ if .Params.attrlicence }} ({{ .Params.attrlicence }}){{ end }}
|
||||
{{- if .Params.attrlink -}}<a href="{{ .Params.attrlink }}" target="_blank" rel="noopener">{{- end -}}
|
||||
{{- .Params.attr | safeHTML -}}
|
||||
{{- if .Params.attrlink -}}</a>{{- end -}}
|
||||
{{- if .Params.attrlicence }} (
|
||||
{{- with .Params.attrlicencelink -}}
|
||||
<a href="{{ . }}" target="_blank" rel="noopener">
|
||||
{{- end -}}
|
||||
{{- .Params.attrlicence -}}
|
||||
{{- with .Params.attrlicencelink -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
)
|
||||
{{- end -}}
|
||||
<p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue