GoBlog/templates/trackdetails.gohtml

19 lines
739 B
Plaintext
Raw Normal View History

2021-11-10 15:27:27 +00:00
{{ define "trackdetails" }}
{{ if .Data.HasTrack }}
{{ $track := (gettrack .Data) }}
{{ if $track }}
2021-11-10 15:27:27 +00:00
{{ if $track.HasPoints }}
{{ $lang := .Blog.Lang }}
<p>{{ with $track.Name }}<b>{{ . }}</b> {{ end }}{{ with $track.Kilometers }}🏁 {{ . }} {{ string $lang "kilometers" }} {{ end }}{{ with $track.Hours }}⌛ {{ . }}{{ end }}</p>
2021-11-22 15:36:17 +00:00
<div class="p" id="map"
data-paths="{{ $track.PathsJSON }}"
data-points="{{ $track.PointsJSON }}"
data-minzoom={{ $track.MinZoom }}
data-maxzoom={{ $track.MaxZoom }}
data-attribution="{{ $track.MapAttribution }}"
></div>
2021-11-10 15:27:27 +00:00
<script defer src="{{ asset "js/geotrack.js" }}"></script>
{{ end }}
{{ end }}
{{ end }}
2021-11-10 15:27:27 +00:00
{{ end }}