mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-21 15:56:29 -05:00
Added shortcode to display GPX/GPS data from gpx.studio
This commit is contained in:
parent
60bbe5949d
commit
7ce94e7c93
1 changed files with 11 additions and 0 deletions
11
layouts/shortcodes/displayGPX.html
Normal file
11
layouts/shortcodes/displayGPX.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{{ $url := printf "%sdata/hikes/%s" .Site.BaseURL (.Get 0) }}
|
||||||
|
{{ $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>
|
Loading…
Reference in a new issue