GoBlog/templates/geomap.gohtml

25 lines
683 B
Plaintext
Raw Normal View History

2021-07-06 19:06:39 +00:00
{{ define "title" }}
2021-08-04 21:26:38 +00:00
<title>{{ mdtitle .Blog.Title }}</title>
2021-07-06 19:06:39 +00:00
{{ if not .Data.nolocations }}
2021-11-10 10:13:30 +00:00
<link rel="stylesheet" href="/x/leaflet/leaflet.css"/>
<script src="/x/leaflet/leaflet.js"></script>
2021-07-06 19:06:39 +00:00
{{ end }}
{{ end }}
{{ define "main" }}
<main>
{{ if .Data.nolocations }}
<p>{{ string .Blog.Lang "nolocations" }}</p>
{{ else }}
2021-11-10 10:13:30 +00:00
<div class="p" id="map" data-locations="{{ .Data.locations }}"></div>
2021-07-06 19:06:39 +00:00
<script defer src="{{ asset "js/geomap.js" }}"></script>
{{ end }}
</main>
{{ if .CommentsEnabled }}
{{ include "interactions" . }}
{{ end }}
2021-07-06 19:06:39 +00:00
{{ end }}
{{ define "geomap" }}
{{ template "base" . }}
{{ end }}