website-theme/layouts/tracks/single.html

39 lines
1.5 KiB
HTML
Raw Normal View History

2022-05-29 12:52:49 -04:00
{{ define "main"}}
{{ .Scratch.Set "customTitleHeaderSet" true }}
{{ .Scratch.Set "customTitleHeader" "Tracks" }}
{{ .Scratch.Set "customTitleHeaderLink" "/tracks" }}
{{ partial "header.html" . }}
<main>
<article class="h-entry">
<h1 class='title p-name'>{{ .Title }}</h1>
<a style="display: none" class="u-url" href="{{ .Permalink }}"></a>
<div style="display: none;" rel="author" class="h-card p-author">
<img class="u-photo" src="{{ .Site.BaseURL }}/img/avatar.jpg"/>
<span > {{ .Site.Params.Author }}</span>
</div>
{{ .Scratch.Set "beforeDateString" "Published on "}}
{{ partial "date.html" . }}
{{ partial "reading_time.html" . }}
{{ 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>
{{ .Content }}
</div>
</article>
{{ partial "webmentions.html" . }}
</main>
{{ partial "footer.html" . }}
{{ end }}