Skip to content

Commit

Permalink
fix headline and maps
Browse files Browse the repository at this point in the history
  • Loading branch information
m1keil committed Dec 1, 2015
1 parent 2569d61 commit e648358
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 31 deletions.
45 changes: 44 additions & 1 deletion themes/devopsdays-legacy/layouts/partials/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,49 @@
- http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1/examples/basic.html
-->
<link href="/css/googlemaps.css" rel="stylesheet">
<script type="text/javascript" language="javascript">
function initialize() {
var map;
var bounds = new google.maps.LatLngBounds();
var mapOptions = {
mapTypeId: 'roadmap'
};

// Display a map on the page
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
map.setTilt(45);

// Add upcoming events here
// Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html
var markers = [
{{ range $.Site.Data.events }}
{{ if eq .status "current" }}
['{{ .city}}', {{ .coordinates | safeJS }}, '{{ .startdate }}'],
{{ end }}
{{ end }}
];

// Display multiple markers on a map
var infoWindow = new google.maps.InfoWindow(), marker, i;

// Loop through our array of markers & place each one on the map
for( i = 0; i < markers.length; i++ ) {
var position = new google.maps.LatLng(markers[i][1], markers[i][2]);
bounds.extend(position);
marker = new MarkerWithLabel({
position: position,
map: map,
labelContent: markers[i][0] + "<br>" + markers[i][3],
labelAnchor: new google.maps.Point(25, 50),
labelClass: "labels",
labelStyle: { opacity: 1 }
});

// refocus
map.fitBounds(bounds);
}
}
</script>

<script type="text/javascript" language="javascript">
window.onload = function()
Expand All @@ -16,7 +59,7 @@

<script type="text/javascript" src="http://maps.google.com/maps/api/js?key=AIzaSyC1bvNK9qFJGEhoWNbQuojmJJ1Tg0DoOew&sensor=false"></script>
<script type="text/javascript" src="/js/googlemaps_label.js"></script>
<script type="text/javascript" src="/js/googlemaps_content.js"></script>
<!-- <script type="text/javascript" src="/js/googlemaps_content.js"></script> -->

<div id="map_canvas" style="width: 550px; height: 265px"></div>
<br>
Expand Down
40 changes: 10 additions & 30 deletions themes/devopsdays-legacy/layouts/partials/upcoming_headline.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
<div class="submenu" style="width:550px">
<h3>
<a href="/events/2016-vancouver/">
Vancouver
</a>
-
<a href="/events/2016-london/">
London
</a>
-
<a href="/events/2016-denver/">
Denver
</a>
-
<a href="/events/2016-kiel/">
Kiel
</a>
<br>
<a href="/events/2016-seattle">
Seattle
</a>
-
<a href="/events/2016-toronto">
Toronto
</a>
-
<a href="/events/2016-washington-dc">
Washington, DC
</a>
-
<a href="/events/2016-minneapolis">
Minneapolis
{{ range $.Site.Data.events }}
{{ if eq .status "current" }}
{{ $.Scratch.Add "events" "<a href = '/events/" }}
{{ $.Scratch.Add "events" .friendly }}
{{ $.Scratch.Add "events" "/welcome'>" }}
{{ $.Scratch.Add "events" .city }}
{{ $.Scratch.Add "events" "</a> - " }}
{{ end }}
{{ end }}
{{ substr ($.Scratch.Get "events") 0 -3 | safeHTML }}
</h3>
</div>

0 comments on commit e648358

Please sign in to comment.