GoBlog/templates/geomap.gohtml

25 lines
772 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-07-19 16:41:38 +00:00
<link rel="stylesheet" href="{{ .Data.mappath }}/leaflet/leaflet.css"/>
<script src="{{ .Data.mappath }}/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-07-19 16:41:38 +00:00
<div class="p" id="map" data-locations="{{ .Data.locations }}" data-tiles="{{ .Data.mappath }}/tiles/{z}/{x}/{y}.png"></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 }}