2020-07-31 13:48:01 +00:00
|
|
|
{{ define "title" }}
|
2021-11-15 20:48:16 +00:00
|
|
|
<link rel="stylesheet" href="{{ asset "css/chroma.css" }}">
|
2021-08-05 06:09:34 +00:00
|
|
|
<title>{{ with .Data.RenderedTitle }}{{ . }} - {{end}}{{ mdtitle .Blog.Title }}</title>
|
2022-01-10 18:23:20 +00:00
|
|
|
{{ postheadmeta .Data .Canonical }}
|
2020-12-22 21:15:29 +00:00
|
|
|
{{ with shorturl .Data }}<link rel="shortlink" href="{{ . }}">{{ end }}
|
2022-01-09 20:08:38 +00:00
|
|
|
{{ if .Data.HasTrack }}
|
|
|
|
<link rel="stylesheet" href="/-/leaflet/leaflet.css"/>
|
|
|
|
<script src="/-/leaflet/leaflet.js"></script>
|
|
|
|
{{ end }}
|
2020-07-31 13:48:01 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
|
|
|
<main class=h-entry>
|
|
|
|
<article>
|
2020-11-01 17:37:21 +00:00
|
|
|
<data class="u-url hide" value="{{ absolute .Data.Path }}"></data>
|
2021-08-05 06:09:34 +00:00
|
|
|
{{ with .Data.RenderedTitle }}<h1 class=p-name>{{ . }}</h1>{{ end }}
|
2022-01-10 18:23:20 +00:00
|
|
|
{{ postmeta .Data .Blog "post" }}
|
2022-01-09 20:08:38 +00:00
|
|
|
<div id="post-actions">
|
|
|
|
<a href="https://www.addtoany.com/share#url={{ shorturl .Data }}{{ with .Data.RenderedTitle }}&title={{ . }}{{ end }}" target="_blank" rel="nofollow noopener noreferrer" class="button">{{ string .Blog.Lang "share" }}</a>
|
|
|
|
<a id="translateBtn" href="https://translate.google.com/translate?u={{ absolute .Data.Path }}" target="_blank" rel="nofollow noopener noreferrer" class="button">{{ string .Blog.Lang "translate" }}</a>
|
|
|
|
<script defer src="{{ asset "js/translate.js" }}"></script>
|
|
|
|
<button id="speakBtn" class="hide" data-speak="{{ string .Blog.Lang "speak" }}" data-stopspeak="{{ string .Blog.Lang "stopspeak" }}"></button>
|
|
|
|
<script defer src="{{ if .Data.TTS }}{{ asset "js/tts.js" }}{{ else }}{{ asset "js/speak.js" }}{{ end }}"></script>
|
|
|
|
</div>
|
|
|
|
{{ if .Data.TTS }}<div class="p hide" id="tts"><audio controls preload=none id="tts-audio"><source src="{{ .Data.TTS }}"/></audio></div>{{ end }}
|
2020-11-01 17:37:21 +00:00
|
|
|
{{ if .Data.Content }}
|
2022-01-09 20:08:38 +00:00
|
|
|
{{ oldcontentwarning .Data .Blog }}
|
|
|
|
<div class=e-content>{{ content .Data false }}</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .Data.HasTrack }}
|
|
|
|
{{ $track := (gettrack .Data) }}
|
|
|
|
{{ if $track }}{{ if $track.HasPoints }}
|
|
|
|
{{ $lang := .Blog.Lang }}
|
|
|
|
<p>{{ with $track.Name }}<b>{{ . }}</b> {{ end }}{{ with $track.Kilometers }}🏁 {{ . }} {{ string $lang "kilometers" }} {{ end }}{{ with $track.Hours }}⌛ {{ . }}{{ end }}</p>
|
|
|
|
<div class="p" id="map" data-paths="{{ $track.PathsJSON }}" data-points="{{ $track.PointsJSON }}" data-minzoom={{ $track.MinZoom }} data-maxzoom={{ $track.MaxZoom }} data-attribution="{{ $track.MapAttribution }}"></div>
|
|
|
|
<script defer src="{{ asset "js/geotrack.js" }}"></script>
|
|
|
|
{{ end }}{{ end }}
|
2020-09-01 17:08:57 +00:00
|
|
|
{{ end }}
|
2022-01-09 20:08:38 +00:00
|
|
|
{{ posttax .Data .Blog }}
|
2020-11-01 17:37:21 +00:00
|
|
|
</article>
|
2022-01-09 20:08:38 +00:00
|
|
|
{{ author }}
|
2020-07-31 13:48:01 +00:00
|
|
|
</main>
|
2021-02-24 15:01:10 +00:00
|
|
|
{{ if .LoggedIn }}
|
2021-06-24 17:09:59 +00:00
|
|
|
<div id="posteditactions" class="p">
|
2021-06-18 12:32:03 +00:00
|
|
|
<form class="in" method="post" action="{{ .Blog.RelativePath "/editor" }}#update">
|
2021-02-24 15:01:10 +00:00
|
|
|
<input type="hidden" name="editoraction" value="loadupdate">
|
2021-10-24 16:02:07 +00:00
|
|
|
<input type="hidden" name="path" value="{{ .Data.Path }}">
|
2021-02-24 15:01:10 +00:00
|
|
|
<input type="submit" value="{{ string .Blog.Lang "update" }}">
|
|
|
|
</form>
|
2021-09-02 06:57:24 +00:00
|
|
|
<form class="in" method="post" action="{{ .Blog.RelativePath "/editor" }}">
|
|
|
|
<input type="hidden" name="action" value="delete">
|
2021-02-24 15:01:10 +00:00
|
|
|
<input type="hidden" name="url" value="{{ .Canonical }}">
|
2021-09-02 06:57:24 +00:00
|
|
|
<input type="submit" value="{{ string .Blog.Lang "delete" }}" class="confirm" data-confirmmessage="{{ string .Blog.Lang "confirmdelete" }}">
|
2021-02-24 15:01:10 +00:00
|
|
|
</form>
|
2022-01-03 12:55:44 +00:00
|
|
|
{{ if .Data.Deleted }}
|
|
|
|
<form class="in" method="post" action="{{ .Blog.RelativePath "/editor" }}">
|
|
|
|
<input type="hidden" name="action" value="undelete">
|
|
|
|
<input type="hidden" name="url" value="{{ .Canonical }}">
|
|
|
|
<input type="submit" value="{{ string .Blog.Lang "undelete" }}">
|
|
|
|
</form>
|
|
|
|
{{ end }}
|
2021-12-16 19:21:54 +00:00
|
|
|
{{ if ttsenabled }}
|
|
|
|
<form class="in" method="post" action="{{ .Blog.RelativePath "/editor" }}">
|
|
|
|
<input type="hidden" name="editoraction" value="tts">
|
|
|
|
<input type="hidden" name="url" value="{{ .Canonical }}">
|
|
|
|
<input type="submit" value="{{ string .Blog.Lang "gentts" }}">
|
|
|
|
</form>
|
|
|
|
{{ end }}
|
2021-09-02 06:57:24 +00:00
|
|
|
<script defer src="{{ asset "js/formconfirm.js" }}"></script>
|
2021-02-24 15:01:10 +00:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
2022-01-09 20:08:38 +00:00
|
|
|
{{ if .CommentsEnabled }}{{ interactions .Blog .Canonical }}{{ end }}
|
2020-07-31 19:02:47 +00:00
|
|
|
{{ end }}
|
|
|
|
|
2020-08-05 17:14:10 +00:00
|
|
|
{{ define "post" }}
|
2020-07-31 19:02:47 +00:00
|
|
|
{{ template "base" . }}
|
2020-07-31 13:48:01 +00:00
|
|
|
{{ end }}
|