forked from blakeshall/whats_my_district_redux
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
239 lines (223 loc) · 7.47 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>What's My District?</title>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.6/mapbox.css' rel='stylesheet' />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.6/mapbox.js'></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/turf/v1.4.0/turf.min.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src='assets/js/handlebars-v3.0.0.js'></script>
<script src='assets/js/whats-my-district.js'></script>
<script src='assets/js/lexington.js'></script>
<script src='assets/js/title-case-helper.js'></script>
</head>
<body>
<style>
body { }
.container { width: 100%;}
#map { height: 450px;}
#address-form {
margin-top: 20px;
margin-bottom: 10px;
width: 450px;
position: relative;
top: -20px;
z-index: 1000;
background: #FFF;
padding: 10px;
padding-left: 25px;
}
#form-row {
/*position: relative;*/
/*top: -60px;*/
height: 0;
}
#footer {
margin-top: 4em;
padding-top: 2em;
border-top: 1px #ccc solid;
width: 100%;
min-height: 5em;
background-color: #f5f5f5;
text-align: center;
}
</style>
<div class="container">
<div class='row'>
<div class='col-md-12'>
<h1 class='text-center'><img src='assets/img/noun_15219.png' heigh="50" width="50" alt='districts'> What's My District?</h1>
</div>
</div>
<div class='row'>
<div class='col-md-12'>
<h4 class='text-center'>Type in an address or click on the map to look up districts</h4>
<a href='alt.html' class='text-center center-block'>See an alternative design</a>
</div>
</div>
<div class='row'>
<div class='col-md-12' id='form-row'>
<form class="form-inline center-block" id='address-form'>
<div class="form-group">
<label class="sr-only" for="search-address">Address</label>
<div class="input-group">
<input type="text" class="form-control" id="search-address" placeholder="560 E. Third St">
<div class="input-group-addon">Lexington, KY</div>
</div>
</div>
<button type="submit" class="btn btn-primary" id='search'>Search</button>
</form>
</div>
</div>
<div class='row'>
<div id='map' class='col-md-12'>
</div>
</div>
<div class='row'>
<div class='col-md-3 col-md-offset-1 text-center'>
<h2>State</h2>
<p class="temp">please enter an address</p>
<div class='col-md-offset-2'>
<div id='senate-results' class='text-left'></div>
<div id='house-results' class='text-left'></div>
</div>
</div>
<div class='col-md-4 text-center'>
<h2>Local</h2>
<p class="temp">please enter an address</p>
<div class='col-md-offset-3'>
<div id='council-results' class='text-left'></div>
<div id='magistrate-results' class='text-left'></div>
<div id='voting-results' class='text-left'></div>
<div id='neighborhood-assoc-results' class='text-left'></div>
<!-- <div id='solid-waste-results' class='text-left'></div> -->
</div>
</div>
<div class='col-md-3 text-center'>
<h2>Schools</h2>
<p class="temp">please enter an address</p>
<div class='col-md-offset-2'>
<div id='elem-results' class='text-left'></div>
<div id='middle-results' class='text-left'></div>
<div id='high-results' class='text-left'></div>
<div id='school-board-results' class='text-left'></div>
</div>
</div>
</div>
</div>
<script>
L.mapbox.accessToken = 'pk.eyJ1IjoiYmxha2VzaGFsbCIsImEiOiJRSkN3Y3prIn0.MfDnpigJE6CVbEsV0xwLfA';
</script>
<script id="house-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>State House District:</strong> {{LEGISLATIV}}</li>
<li><strong>Rep:</strong> {{titleCase LEGREP}}</li>
</ul>
</script>
<script id="senate-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>State Senate District:</strong> {{SENATORIAL}}</li>
<li><strong>Rep:</strong> {{titleCase SENREP}}</li>
</ul>
</script>
<script id="council-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>Council District:</strong> {{DISTRICT}}</li>
<li>Rep: <a href="{{URL}}">{{titleCase REP}}</a></li>
<li>Email: <a href="mailto:{{EMAIL}}">{{EMAIL}}</a></li>
<li>Telephone: <a href="tel:{{TELEPHONE}}">{{TELEPHONE}}</a></li>
</ul>
<h4><strong>Council at-large</strong></h4>
<ul class='list-unstyled'>
<li>
<a class='name' href='http://www.lexingtonky.gov/index.aspx?page=353'>
Steve Kay, Vice Mayor
</a>
<br>
<a href="tel:(859) 258-3202">(859) 258-3202</a>
·
<a href='mailto:[email protected]'>
</a>
</li>
<li>
<a class='name' href='http://www.lexingtonky.gov/index.aspx?page=355'>
Kevin Stinnett
</a>
<br>
<a href="tel:(859) 258-3225">(859) 258-3225</a>
·
<a href='mailto:[email protected]'>
</a>
</li>
<li>
<a class='name' href='http://www.lexingtonky.gov/index.aspx?page=354'>
Richard Moloney
</a>
<br>
<a href="tel:(859) 258-3828">(859) 258-3828</a>
·
<a href='mailto:[email protected]'>
</a>
</li>
</ul>
</script>
<script id="magistrate-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>Magistrate District:</strong> {{MAGISTERIA}}</li>
<li><strong>Rep:</strong> {{titleCase MAGREP}}</li>
</ul>
</script>
<script id="voting-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>Voting Precinct:</strong> {{titleCase NAME}}</li>
</ul>
</script>
<script id="elem-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>Elementary School:</strong> {{AREA_NAME}}</li>
</ul>
</script>
<script id="middle-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>Middle School:</strong> {{AREA_NAME}}</li>
</ul>
</script>
<script id="high-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>High School:</strong> {{AREA_NAME}}</li>
</ul>
</script>
<script id="school-board-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>School Board District:</strong> {{SCHOOL}}</li>
<li><strong>Rep:</strong> {{titleCase SCHREP}}</li>
</ul>
</script>
<script id="neighborhood-assoc-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>Neighborhood Association(s):</strong> {{Assoc_Name}}</li>
</ul>
</script>
<script id="solid-waste-template" type="text/x-handlebars-template">
<ul class='list-unstyled'>
<li><strong>Solid Waste Pickup:</strong> {{DAY}}</li>
</ul>
</script>
<div id="footer">
<div class="container">
<p>
Made by <a href="http://openlexington.org">OpenLexington</a> in 2015 |
Data from <a href="http://data.lexingtonky.gov">Lexington's Open Data Catalog</a> |
<a href="https://github.com/openlexington/whats_my_district_redux">Fork this project on GitHub</a>
</p>
<p><a href="http://openlexington.org"><img src="assets/img/OpenLex_sm.png"></a></p>
</div>
</div>
</body>
</html>