mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-13 09:52:17 +00:00
Move the map JS out from the theme
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: Visit Us
|
||||
subtitle: Come take a look around.
|
||||
layout: visit
|
||||
---
|
||||
|
||||
Leigh Hackspace is located inside [Leigh Spinners Mill](https://www.spinnersmill.co.uk), a [Grade II* listed](https://historicengland.org.uk/advice/heritage-at-risk/search-register/list-entry/48399) former cotton spinning mill, restored by Leigh Building Preservation Trust and now hosting [multiple business and community projects](https://www.spinnersmill.co.uk).
|
||||
@@ -18,7 +19,9 @@ Leigh
|
||||
WN7 2LB
|
||||
```
|
||||
|
||||
{{< map >}}
|
||||
{{< rawhtml >}}
|
||||
<div id="map" class="map"></div>
|
||||
{{</ rawhtml >}}
|
||||
|
||||
What3Words: [//escape.shot.cleansed](https://what3words.com/escape.shots.cleansed) - This is for the main entrance of Mill 2.
|
||||
|
||||
|
||||
19
layouts/page/visit.html
Normal file
19
layouts/page/visit.html
Normal 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 }}
|
||||
@@ -1,2 +0,0 @@
|
||||
<div id="map" class="map"></div>
|
||||
{{ .Page.Store.Set "hasMap" true }}
|
||||
@@ -8,11 +8,6 @@
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Page.Store.Get "hasMap" }}
|
||||
<script src="https://cdn.jsdelivr.net/npm/ol@v8.2.0/dist/ol.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v8.2.0/ol.css">
|
||||
{{ end }}
|
||||
|
||||
{{ $theme := resources.Get "js/theme.js" }}
|
||||
{{ $site := resources.Get "js/site.js" }}
|
||||
{{ $js := slice $site $theme | resources.Concat "js/bundle.js" | resources.Minify }}
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
<link rel="alternate" type="text/calendar" href="{{ .Site.Params.calendarUrl }}" title="{{ .Site.Title }} Events">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{ if .Page.Store.Get "hasMap" }}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v8.2.0/ol.css">
|
||||
{{ end }}
|
||||
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/leighhack.css" }}
|
||||
{{ with resources.Get "sass/leighhack.scss" | toCSS $opts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
|
||||
Reference in New Issue
Block a user