forked from CloudCannon/fur-jekyll-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
executable file
·62 lines (53 loc) · 2.63 KB
/
contact.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
title: Contact
description: Get in touch
email: [email protected]
hero: Get in touch
map:
latitude: -45.873511
longitude: 170.503704
address: 'Dunedin, New Zealand'
zoom: 13
---
<div class="contact-box">
<form action="{{ site.baseurl }}/contact-success/" method="post" class="contact-form">
<h3>Send us a message</h3>
<label for="name">Full Name</label>
<input type="text" name="name" id="name" placeholder="Enter your name..." autofocus>
<label for="email">Email Address</label>
<input type="email" name="email" id="email" placeholder="Enter your email..." required inputmode="email">
<label for="message">Message</label>
<textarea name="message" id="message" placeholder="Enter your message..."></textarea>
<input type="hidden" name="_to" value="{{ page.email }}">
<input type="text" name="_gotcha" style="display: none;">
<input type="submit" value="Send Message">
</form>
<div class="contact-details">
<div class="map" id="map"></div>
</div>
<script type="text/javascript">
window.mapData = {{ page.map | jsonify }};
function initMap() {
var myOptions = {
scrollwheel: false,
draggable: false,
panControl: false,
disableDefaultUI: true,
styles: [{"featureType":"administrative","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"visibility":"simplified"},{"color":"#fcfcfc"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"visibility":"simplified"},{"color":"#fcfcfc"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"visibility":"simplified"},{"color":"#dddddd"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"visibility":"simplified"},{"color":"#dddddd"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"visibility":"simplified"},{"color":"#eeeeee"}]},{"featureType":"water","elementType":"geometry","stylers":[{"visibility":"simplified"},{"color":"#dddddd"}]}],
zoom: window.mapData.zoom,
maxZoom: window.mapData.zoom,
minZoom: window.mapData.zoom,
center: new google.maps.LatLng(window.mapData.latitude, window.mapData.longitude),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map"), myOptions);
marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(window.mapData.latitude, window.mapData.longitude)
});
google.maps.event.addDomListener(window, "resize", function () {
map.setCenter(myOptions.center);
});
}
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key={{ site.google_maps_javascript_api_key }}&callback=initMap"></script>