Move the map JS out from the theme

This commit is contained in:
2024-02-11 09:30:59 +00:00
parent 82f2e2d667
commit 4d95f600c5
5 changed files with 23 additions and 11 deletions

19
layouts/page/visit.html Normal file
View File

@@ -0,0 +1,19 @@
{{ define "title" }}
{{ .Title }}
{{ end }}
{{ define "subtitle" }}
{{ .Params.subtitle }}
{{ end }}
{{ define "extra_css" }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v8.2.0/ol.css">
{{ end }}
{{ define "extra_js" }}
<script src="https://cdn.jsdelivr.net/npm/ol@v8.2.0/dist/ol.js"></script>
{{ end }}
{{ define "content" }}
{{ .Content }}
{{ end }}

View File

@@ -1,2 +0,0 @@
<div id="map" class="map"></div>
{{ .Page.Store.Set "hasMap" true }}