mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-10-09 10:11:14 +00:00
Refactored GPX code
This commit is contained in:
parent
defe7686a2
commit
d703530905
4 changed files with 17 additions and 31 deletions
|
@ -17,18 +17,8 @@
|
|||
{{ partial "tags/page.html" . }}
|
||||
<!-- content -->
|
||||
<div class="e-content">
|
||||
<!-- Move this to a common folder later -->
|
||||
{{ $url := printf "%sdata/tracks/%s" .Site.BaseURL .Params.gpx }}
|
||||
{{ $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>
|
||||
{{ .Scratch.Set "gpxFile" .Params.gpx }}
|
||||
{{ partial "gpxstudio.html" . }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue