diff --git a/archetypes/tracks.md b/archetypes/tracks.md new file mode 100644 index 0000000..6d790c5 --- /dev/null +++ b/archetypes/tracks.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ dateFormat "2006-01-02T15:04:05Z07:00" .Date }} +draft: true +gpx: "" +--- diff --git a/layouts/shortcodes/displayGPX.html b/layouts/shortcodes/displayGPX.html index aaf80be..7ed4a42 100644 --- a/layouts/shortcodes/displayGPX.html +++ b/layouts/shortcodes/displayGPX.html @@ -1,4 +1,4 @@ -{{ $url := printf "%sdata/hikes/%s" .Site.BaseURL (.Get 0) }} +{{ $url := printf "%sdata/tracks/%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 }} diff --git a/layouts/tracks/list.html b/layouts/tracks/list.html new file mode 100644 index 0000000..fff797b --- /dev/null +++ b/layouts/tracks/list.html @@ -0,0 +1,20 @@ +{{ define "main"}} + {{ partial "header.html" . }} +
+ {{ partial "search.html" . }} + +
+ {{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}} + {{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }} + {{ range .Pages }} +
+

{{ .Title }}

+ {{ .Scratch.Set "noDateUpdate" true }} + {{ partial "date.html" . }} +
+ {{ end }} + {{ end }} +
+
+ {{ partial "footer.html" . }} +{{ end }} diff --git a/layouts/tracks/single.html b/layouts/tracks/single.html new file mode 100644 index 0000000..4901ef8 --- /dev/null +++ b/layouts/tracks/single.html @@ -0,0 +1,38 @@ +{{ define "main"}} +{{ .Scratch.Set "customTitleHeaderSet" true }} +{{ .Scratch.Set "customTitleHeader" "Tracks" }} +{{ .Scratch.Set "customTitleHeaderLink" "/tracks" }} +{{ partial "header.html" . }} +
+
+

{{ .Title }}

+ + + {{ .Scratch.Set "beforeDateString" "Published on "}} + {{ partial "date.html" . }} + {{ partial "reading_time.html" . }} + {{ partial "tags/page.html" . }} + +
+ + {{ $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 }} + + {{ .Content }} +
+
+ {{ partial "webmentions.html" . }} +
+{{ partial "footer.html" . }} +{{ end }}