diff --git a/config.toml.example b/config.toml.example index c2b20d06..8f538f41 100644 --- a/config.toml.example +++ b/config.toml.example @@ -68,8 +68,7 @@ cinPlaylistID = "PLsxUDJzU4VKAAH1pOogbzJx7pZgd-2zOx" channelURL = "//youtube.com/ury1350" - [pageContext.gmaps] - APIKey = "AIzaSyACeeyIgdIhiSxV01OIPiA3MyJDqrOspLQ" + [pageContext.osm] latitude = 53.948193 longitude = -1.054030 diff --git a/public/js/responsivemap.js b/public/js/responsivemap.js index a5ca9730..517938aa 100644 --- a/public/js/responsivemap.js +++ b/public/js/responsivemap.js @@ -1,38 +1,7 @@ -/*global google:true placeName*/ - -$(document).ready(function () { - //Google Maps JS - //Set Map - function initialize() { - var uryLocation = new google.maps.LatLng(Lat, Lng); - var mapOptions = { - zoom: 15, - center: uryLocation - }; - - var map = new google.maps.Map(document.getElementById("map"), mapOptions); - //Callout Content - var contentString = placeName; - //Set window width + content - var infowindow = new google.maps.InfoWindow({ - content: contentString, - maxWidth: 500 - }); - - //Add Marker - var marker = new google.maps.Marker({ - position: uryLocation, - map, - title: placeName - }); - - //Resize Function - google.maps.event.addDomListener(window, "resize", function () { - var center = map.getCenter(); - google.maps.event.trigger(map, "resize"); - map.setCenter(center); - }); - } - - google.maps.event.addDomListener(window, "load", initialize); -}); \ No newline at end of file +var map = L.map('map').setView([Lat, Lng], 15); +L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + maxZoom: 19, + attribution: '© OpenStreetMap' +}).addTo(map); +var marker = L.marker([Lat, Lng]).addTo(map); +marker.bindPopup("University Radio York").openPopup(); diff --git a/structs/config.go b/structs/config.go index fab9f4fa..9b704d97 100644 --- a/structs/config.go +++ b/structs/config.go @@ -50,7 +50,7 @@ type PageContext struct { CacheBuster string `toml:"cacheBuster"` Pages []Page Youtube youtube - Gmaps gmaps + Osm osm CurrentYear int } @@ -99,8 +99,7 @@ type youtube struct { ChannelURL string `toml:"channelURL"` } -type gmaps struct { - APIKey string `toml:"apiKey"` +type osm struct { Lat float32 `toml:"latitude"` Lng float32 `toml:"longitude"` } diff --git a/views/cin.tmpl b/views/cin.tmpl index 2d7f1d51..6d9b785a 100644 --- a/views/cin.tmpl +++ b/views/cin.tmpl @@ -1,7 +1,10 @@ {{define "title"}}{{.PageContext.ShortName}} | Candidate Interview Night{{end}} -{{define "content"}} +{{define "head"}} +{{end}} + +{{define "content"}}
diff --git a/views/contact.tmpl b/views/contact.tmpl index d72ed77f..08f20513 100644 --- a/views/contact.tmpl +++ b/views/contact.tmpl @@ -11,6 +11,11 @@ {{end}} +{{define "head"}} + +{{end}} {{define "content"}}