forked from laurenancona/philly-pope-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimeline.html
269 lines (243 loc) · 9.65 KB
/
timeline.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!doctype html>
<!-- Special thanks to @thomasfuchs for building the timeline -->
<html>
<head>
<meta charset="utf-8">
<title>
CLE RNC 2016: Timeline
</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<meta property="og:title" content="CLE RNC 2016 Timeline | Street Closures for the Republican National Convention" />
<meta property="og:url" content="http://opencleveland.org/rnc-map/timeline.html" />
<meta property="og:site_name" content="CLE RNC 2016: Timeline" />
<meta property="og:image" content="/img/timeline-rnc.jpg" />
<meta property="og:description" content="A timeline of restrictions and closures for the Republican National Convention, July 18-21 by @opencleveland" />
<meta name="twitter:card" content="photo" />
<meta name="twitter:site" content="@laurenancona" />
<meta name="twitter:creator" content="@laurenancona" />
<link rel="image_src" href="https://phillypopemap.com/img/hotlink-ok/phillypopemap.jpg" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.4/material.deep_orange-light_blue.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/timeline.css?2">
<link rel="stylesheet" href="css/ShareButton.css">
<script src="js/ShareButton.js"
<script src="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.min.js"></script>
</head>
<body>
<!-- LA Google Tag Manager, of course -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W6WFRN"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W6WFRN');</script>
<!-- End Google Tag Manager -->
<header>
<!-- Right Header Buttons -->
<div>
<a href="/" target="_blank"><img src="img/star.jpg"/><small><p class="header--small">Philly Pope Map</p></small>
<h1>Timeline</h1></a>
<a id="view-map" href="/">VIEW MAP</a>
<!-- <share-button id="share">SHARE</share-button>-->
<script>
new ShareButton({
networks: {
facebook: {
app_id: "843077295784066"
}
}
});
</script>
<div id="key">
<span class="parking">Parking</span>
<span class="driving">Driving</span>
<span class="walking">Walking</span>
<span class="transit">Transit</span>
</div>
</div>
</header>
<div id="timeline">
<div id="timeline-header">
<div>Sun Sep 20</div>
<div>Mon Sep 21</div>
<div>Tue Sep 22</div>
<div>Wed Sep 23</div>
<div>Thu Sep 24</div>
<div>Fri Sep 25</div>
<div class="main">Sat Sep 26</div>
<div class="main">Sun Sep 27</div>
<div>Mon Sep 28</div>
</div>
<div id="timeline-content"></div>
<div style="clear:both;">
<div id="contact">
<!-- <div><img src="img/codeforliberty.png"/></div>-->
<p><small>Made with <img src="img/heart-12.png"/> in Philadelphia by <a href="https://twitter.com/laurenancona" target="_blank">Lauren Ancona</a> & <a href="https://twitter.com/thomasfuchs" target="_blank">Thomas Fuchs</a></small></p>
</div>
</div>
</div>
</div>
<script>
(function () {
var $tl = document.getElementById('timeline-content');
function add(rowHTML) {
var div = document.createElement('div');
div.innerHTML = rowHTML;
$tl.appendChild(div);
}
function positionForTimestamp(timestamp) {
var width = document.getElementById('timeline').offsetWidth,
left = +(new Date(2015, 8, 20)),
right = +(new Date(2015, 8, 29)),
pixelsPerMs = (right - left) / width;
return (+timestamp - left) / pixelsPerMs;
}
function addBar(title, from, to, klass, link) {
var pxFrom = positionForTimestamp(from),
pxTo = positionForTimestamp(to),
width = pxTo - pxFrom;
add('<div class="bar ' + klass + '" style="' +
'left:' + pxFrom + 'px;' +
'width:' + width + 'px">' +
'<a href="' + link + '">' + title +
'</a>' + '</div>'
);
}
function addLine(timestamp, klass) {
var px = positionForTimestamp(timestamp),
span = document.createElement('span');
span.className = 'line ' + (klass || '');
span.style.left = px + 'px';
$tl.appendChild(span);
}
function render() {
$tl.innerHTML = '';
addLine(new Date(2015, 8, 20, 6), 'sub');
addLine(new Date(2015, 8, 20, 12), 'sub');
addLine(new Date(2015, 8, 20, 18), 'sub');
addLine(new Date(2015, 8, 21));
addLine(new Date(2015, 8, 21, 6), 'sub');
addLine(new Date(2015, 8, 21, 12), 'sub');
addLine(new Date(2015, 8, 21, 18), 'sub');
addLine(new Date(2015, 8, 22));
addLine(new Date(2015, 8, 22, 6), 'sub');
addLine(new Date(2015, 8, 22, 12), 'sub');
addLine(new Date(2015, 8, 22, 18), 'sub');
addLine(new Date(2015, 8, 23));
addLine(new Date(2015, 8, 23, 6), 'sub');
addLine(new Date(2015, 8, 23, 12), 'sub');
addLine(new Date(2015, 8, 23, 18), 'sub');
addLine(new Date(2015, 8, 24));
addLine(new Date(2015, 8, 24, 6), 'sub');
addLine(new Date(2015, 8, 24, 12), 'sub');
addLine(new Date(2015, 8, 24, 18), 'sub');
addLine(new Date(2015, 8, 25));
addLine(new Date(2015, 8, 25, 6), 'sub');
addLine(new Date(2015, 8, 25, 12), 'sub');
addLine(new Date(2015, 8, 25, 18), 'sub');
addLine(new Date(2015, 8, 26));
addLine(new Date(2015, 8, 26, 6), 'sub');
addLine(new Date(2015, 8, 26, 12), 'sub');
addLine(new Date(2015, 8, 26, 18), 'sub');
addLine(new Date(2015, 8, 27));
addLine(new Date(2015, 8, 27, 6), 'sub');
addLine(new Date(2015, 8, 27, 12), 'sub');
addLine(new Date(2015, 8, 27, 18), 'sub');
addLine(new Date(2015, 8, 28));
addLine(new Date(2015, 8, 28, 6), 'sub');
addLine(new Date(2015, 8, 28, 12), 'sub');
addLine(new Date(2015, 8, 28, 18), 'sub');
// towing
addBar('Towing enforcement (Parkway/Art Museum East to 12th St)',
new Date(2015, 8, 20, 18, 0),
new Date(2015, 8, 28, 18, 0),
'parking',
"/#15/39.9606/-75.1681"
);
addBar('Towing enforcement (North and South of Parkway)',
new Date(2015, 8, 21, 21, 0),
new Date(2015, 8, 28, 18, 0),
'parking',
"/#15/39.9607/-75.1700"
);
addBar('Towing enforcement (3rd St to 12th St)',
new Date(2015, 8, 22, 18, 0),
new Date(2015, 8, 28, 18, 0),
'parking',
"/#15/39.9514/-75.1470"
);
addBar('Towing enforcement (authorized vehicle routes)',
new Date(2015, 8, 23, 21, 0),
new Date(2015, 8, 28, 18, 0),
'parking',
"/#15/39.9548/-75.1595"
);
addBar('Parkway secure vehicle perimeter',
new Date(2015, 8, 24, 20, 0),
new Date(2015, 8, 28, 18, 0),
'driving',
"/#15/39.9591/-75.1655"
);
addBar('No driving allowed (authorized vehicle routes)',
new Date(2015, 8, 25, 8, 0),
new Date(2015, 8, 28, 18, 0),
'driving',
"/#15/39.9552/-75.1598"
);
addBar('Independence Mall secure vehicle perimeter',
new Date(2015, 8, 25, 22, 0),
new Date(2015, 8, 28, 18, 0),
'driving',
"/#16/39.9516/-75.1474"
);
addBar('Center City Traffic box',
new Date(2015, 8, 25, 18, 0),
new Date(2015, 8, 28, 18, 0),
'driving',
"/#14/39.9565/-75.1600"
);
addBar('University City Traffic box',
new Date(2015, 8, 25, 22, 0),
new Date(2015, 8, 28, 18, 0),
'driving',
"/#15/39.9517/-75.1856"
);
// perimeters
addBar('Parkway secure perimeter',
new Date(2015, 8, 24, 20, 0),
new Date(2015, 8, 28, 18, 0),
'walking',
"/#15/39.9581/-75.1652"
);
addBar('Independence Mall secure perimeter',
new Date(2015, 8, 25, 22, 0),
new Date(2015, 8, 27, 18, 0),
'walking',
"/#16/39.9511/-75.1469"
);
addBar('Taxis not allowed to move in/out Traffic Box',
new Date(2015, 8, 26, 2, 0),
new Date(2015, 8, 28, 3, 0),
'transit',
"/#14/39.9560/-75.1594"
);
addBar('Subway & Bus Revised Service',
new Date(2015, 8, 26, 5, 30),
new Date(2015, 8, 28, 1, 0),
'transit',
"/#14/39.9561/-75.1593"
);
addLine(new Date, 'current');
}
window.addEventListener('resize', render);
render();
setInterval(render, 5*60*1000);
})();
</script>
</body>
</html>