website-theme/layouts/partials/external/gpxstudio.html

13 lines
544 B
HTML
Raw Normal View History

2022-06-02 20:32:21 -04:00
{{ $gpxFile := .Scratch.Get "gpxFile" }}
{{ $url := printf "%sdata/tracks/%s" .Site.BaseURL $gpxFile }}
{{ $url_state := querify "state" (printf "{\"urls\":[\"%s\"]}" $url) }}
{{ $iframe_url := printf "https://gpx.studio/?%s&embed&distance" $url_state }}
{{ $a_url := printf "https://gpx.studio/?%s" $url_state }}
<iframe {{ printf "src=%q" $iframe_url | safeHTMLAttr }}
width="100%"
height="500"
frameborder="0"
allowfullscreen>
<p><a {{ printf "href=%q" $a_url | safeHTMLAttr }}></a></p>
</iframe>