GoBlog/templates/geomap.gohtml

25 lines
772 B
Plaintext

{{ define "title" }}
<title>{{ mdtitle .Blog.Title }}</title>
{{ if not .Data.nolocations }}
<link rel="stylesheet" href="{{ .Data.mappath }}/leaflet/leaflet.css"/>
<script src="{{ .Data.mappath }}/leaflet/leaflet.js"></script>
{{ end }}
{{ end }}
{{ define "main" }}
<main>
{{ if .Data.nolocations }}
<p>{{ string .Blog.Lang "nolocations" }}</p>
{{ else }}
<div class="p" id="map" data-locations="{{ .Data.locations }}" data-tiles="{{ .Data.mappath }}/tiles/{z}/{x}/{y}.png"></div>
<script defer src="{{ asset "js/geomap.js" }}"></script>
{{ end }}
</main>
{{ if .CommentsEnabled }}
{{ include "interactions" . }}
{{ end }}
{{ end }}
{{ define "geomap" }}
{{ template "base" . }}
{{ end }}