-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
159 lines (127 loc) · 6.56 KB
/
index.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Codeforcologne: Wahlhelfer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<style>
body,h1,h2,h3,h4,h5,h6 {font-family: "Lato", sans-serif}
.w3-navbar,h1,button {font-family: "Montserrat", sans-serif}
.fa-anchor,.fa-coffee {font-size:200px}
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
}
#mapid { height: 300px; }
</style>
<body>
<!-- Navbar -->
<ul class="w3-navbar w3-white w3-card-2 w3-top w3-large">
<li class="w3-hide-medium w3-hide-large w3-opennav w3-right">
<a class="w3-padding-large w3-hover-red w3-large w3-white" href="javascript:void(0);" onclick="myFunction()" title="Toggle Navigation Menu"><i class="fa fa-bars"></i></a>
</li>
<li><a href="#" class="w3-padding-large w3-white w3-left-align">Wahlhelfer</a></li>
<li class="w3-hide-small"><a href="#" class="w3-padding-large w3-white w3-hover-red w3-right-align">?</a></li>
<li class="w3-hide-small"><a href="#" class="w3-padding-large w3-white w3-hover-red w3-right-align">Code for Cologne</a></li>
<li class="w3-hide-small"><a href="#" class="w3-padding-large w3-white w3-hover-red w3-right-align">Open Data</a></li>
</ul>
<!-- Navbar on small screens -->
<div id="navDemo" class="w3-hide w3-hide-large w3-hide-medium w3-top">
<ul class="w3-navbar w3-left-align w3-large w3-red">
<li><a class="w3-padding-large" href="#">?</a></li>
<li><a class="w3-padding-large" href="#">Code for Cologne</a></li>
<li><a class="w3-padding-large" href="#">Open Data</a></li>
<br>>
<br>>
</ul>
</div>
<!-- Header -->
<div class="w3-container w3-red w3-center w3-padding-32">
<h1 class="w3-large" w3-align-center hidden>Code for Cologne: Wahlhelfer</h1>
</div>
<div id="mapid"></div>
<!-- First Grid -->
<div class="w3-row-padding w3-padding-64 w3-container">
<div class="w3-content">
<div class="w3-twothird">
<h1>Lorem Ipsum</h1>
<h5 class="w3-padding-32">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</h5>
<p class="w3-text-grey">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
<div class="w3-third w3-center">
<i class="fa fa-anchor w3-padding-64 w3-text-red"></i>
</div>
</div>
</div>
<!-- Second Grid -->
<div class="w3-row-padding w3-light-grey w3-padding-64 w3-container">
<div class="w3-content">
<div class="w3-third w3-center">
<i class="fa fa-coffee w3-padding-64 w3-text-red w3-margin-right"></i>
</div>
<div class="w3-twothird">
<h1>Lorem Ipsum</h1>
<h5 class="w3-padding-32">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</h5>
<p class="w3-text-grey">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</div>
</div>
<div class="w3-container w3-black w3-center w3-opacity w3-padding-64">
<h1 class="w3-margin w3-xlarge">Quote of the day: live life</h1>
</div>
<!-- Footer -->
<footer class="w3-container w3-padding-64 w3-center w3-opacity">
<div class="w3-xlarge w3-padding-32">
<a href="https://github.com/codeforcologne/wahlhelfer.git" class="w3-hover-text-light-blue"><i class="fa fa-github"></i></a>
<a href="https://twitter.com/codeforcologne" class="w3-hover-text-grey"><i class="fa fa-twitter"></i></a>
</div>
<p>Powered by love for data and <a href="http://www.w3schools.com/w3css/default.asp" target="_blank">w3.css </a></p>
</footer>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script>
// Used to toggle the menu on small screens when clicking on the menu button
function myFunction() {
var x = document.getElementById("navDemo");
if (x.className.indexOf("w3-show") == -1) {
x.className += " w3-show";
} else {
x.className = x.className.replace(" w3-show", "");
}
}
// Leaflet and Mapbox
// Initialize Map
var map = L.map('mapid');
map.locate({setView: true, maxZoom: 16});
function onLocationFound(e) {
var radius = e.accuracy / 2;
L.marker(e.latlng).addTo(map)
.bindPopup("You are within " + radius + " meters from this point").openPopup();
L.circle(e.latlng, radius).addTo(map);
}
map.on('locationfound', onLocationFound);
function onLocationError(e) {
alert(e.message);
}
map.on('locationerror', onLocationError);
// Mapbox
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18,
id: 'p3nny.1b4m7m24',
accessToken: 'pk.eyJ1IjoicDNubnkiLCJhIjoiY2lzdGFwMTFyMDAyMjJ5cWxrMGVqY3N6cyJ9.5Vu-WyS2VrUaJ_-FBV5Elg'
}).addTo(map);
</script>
</body>
</html>