forked from toolness/mas-bebe-itvs-sprint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
372 lines (334 loc) · 9.69 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
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>¿Más Bebés?</title>
<base target="_blank">
<style>
html, body {
padding: 0px;
background: black;
margin: 0px;
padding: 0px;
overflow: hidden;
font-family: "Helvetica Neue", Helvetica, sans-serif;
}
.primary-sync-source {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
}
div.interactive {
position: absolute;
bottom: 5px;
left: 10px;
right: 10px;
text-align: center;
}
div.thumbnails {
font-size: 0px;
}
div.thumbnails img {
width: 10%;
-moz-transition-property: width, opacity;
-moz-transition-duration: 0.5s;
-webkit-transition-property: width, opacity;
-webkit-transition-duration: 0.5s;
-o-transition-property: width, opacity;
-o-transition-duration: 0.5s;
padding: 0px;
opacity: 0.5;
cursor: pointer;
}
div.thumbnails div {
position: relative;
display: inline;
}
div.thumbnails div span.year {
position: absolute;
color: white;
font-size: 12px;
font-weight: bold;
text-shadow: 2px 2px 3px black;
padding: 4px;
bottom: 0px;
right: 0px;
pointer-events: none;
}
div.thumbnails div.active img {
opacity: 1.0;
width: 15%;
}
div.thumbnails img:hover {
opacity: 1.0;
}
ul.additional-media {
list-style-type: none;
font-size: 12px;
padding: 0;
}
ul.additional-media li {
display: inline;
white-space: nowrap;
}
ul.additional-media li a {
opacity: 0.2;
color: white;
text-decoration: none;
-moz-transition: opacity 0.5s;
-webkit-transition: opacity 0.5s;
-o-transition: opacity 0.5s;
}
ul.additional-media li.active a {
opacity: 0.8;
}
ul.additional-media li a:hover {
opacity: 1.0;
}
ul.additional-media li:after {
opacity: 0.1;
color: white;
content: '/';
}
ul.additional-media li:last-child:after {
content: none;
}
ul.additional-media span.year:before {
content: ' - ';
}
div.lightbox-overlay {
z-index: 5000;
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
background: rgba(0, 0, 0, 0.5);
}
div.lightbox-close-button {
text-align: right;
padding: 3px;
cursor: pointer;
background: rgba(255, 255, 255, 0.05);
}
div.lightbox-close-button:after {
color: white;
content: "x";
}
div.lightbox-close-button:hover {
background: firebrick;
color: white;
}
div.lightbox-window {
position: relative;
color: black;
width: 60%;
margin: 5% auto;
}
div.lightbox-content {
background: transparent;
}
div.lightbox-content video {
width: 100%;
}
a.project-link {
display: block;
position: absolute;
right: 0px;
top: 0px;
padding: 8px;
text-decoration: none;
color: white;
font-family: Baskerville, Georgia, serif;
opacity: 0.5;
font-style: italic;
-moz-transition: opacity 1s;
-webkit-transition: opacity 1s;
-o-transition: opacity 1s;
}
a.project-link:hover {
opacity: 1.0;
}
.ribbon {
display: block;
position: absolute;
top: 10%;
left: 0px;
padding: 10px;
font-size: 20px;
color: white;
background: rgba(0, 0, 0, 0.75);
}
.titles div span.year {
opacity: 0;
-moz-transition: opacity 0.5s;
}
.titles div.active span.year {
opacity: 1;
}
.pause-indicator {
color: yellow;
z-index: 500;
}
.pause-indicator .instructions {
font-size: 10px;
}
.content {
position: relative;
margin: 0 auto;
}
</style>
<div class="content">
<video autoplay class="primary-sync-source">
<source src="http://labs.toolness.com/temp/mas-bebe/masbebes-854x480.mp4"></source>
<source src="http://labs.toolness.com/temp/mas-bebe/masbebes-854x480.webm"></source>
</video>
<a class="project-link" href="http://laprensa-sandiego.org/featured/%C2%BFmas-bebes-documentary-on-sterilization-of-hispanic-women-2/">¿Más Bebés?</a>
<div class="lightbox-overlay" style="display: none">
<div class="lightbox-window">
<div class="lightbox-close-button"></div>
<div class="lightbox-content"></div>
</div>
</div>
<div class="interactive">
<div class="thumbnails">
<div data-active-during="3-5">
<img src="timeline_images/1927.jpg">
<span class="year">1927</span>
</div>
<div data-active-during="23-31">
<img src="timeline_images/1941.jpg">
<span class="year">1941</span>
</div>
<div data-active-during="32-40">
<img src="timeline_images/1945.jpg">
<span class="year">1945</span>
</div>
<div data-active-during="41-49">
<img src="timeline_images/1965.jpg">
<span class="year">1965</span>
</div>
<div data-active-during="64-73">
<img src="timeline_images/1968.jpg">
<span class="year">1968</span>
</div>
<div data-active-during="74-92">
<img src="timeline_images/1973.jpg">
<span class="year">1973</span>
</div>
<div data-active-during="146-155">
<img src="timeline_images/1980.jpg">
<span class="year">1980</span>
</div>
<div data-active-during="180-188">
<img src="timeline_images/1994.jpg">
<span class="year">1994</span>
</div>
<div data-active-during="193-206">
<img src="timeline_images/2011.jpg">
<span class="year">today</span>
</div>
</div>
<ul class="additional-media">
<li data-active-during="2-6">
<a class="lightbox" href="http://labs.toolness.com/temp/mas-bebe/darwin.webm">Supreme Court <span class="year">1927</span></a>
</li>
<li data-active=during="33-41">
<a class="lightbox" href="http://videos-origin.mozilla.org/serv/webmademovies/itvs/masbebes/1945_OperationWetback.webm">Mexican Border <span class="year">1945</span></a>
</li>
<li data-active-during="42-50">
<a class="lightbox" href="http://labs.toolness.com/temp/mas-bebe/operacion.webm">Puerto Rico <span class="year">1965</span></a>
</li>
<li data-active-during="65-74">
<a class="lightbox" href="http://videos-origin.mozilla.org/serv/webmademovies/itvs/masbebes/1968_NixonBC_Appalachia.webm">Appalachia <span class="year">1968</span></a>
</li>
<li data-active-during="66-75">
<a class="lightbox" href="http://videos-origin.mozilla.org/serv/webmademovies/itvs/masbebes/1972_Rumsfeld.webm">Rumsfeld <span class="year">1972</span></a>
</li>
<li data-active-during="75-93">
<a class="lightbox" href="http://labs.toolness.com/temp/mas-bebe/nixon.webm">Nixon <span class="year">1972</span></a>
</li>
<li data-active-during="147-156">
<a class="lightbox" href="http://videos-origin.mozilla.org/serv/webmademovies/itvs/masbebes/1980_VirginiaSterilization_.webm">Virginia <span class="year">1980</span></a>
</li>
<li data-active-during="148-157">
<a class="lightbox" href="http://videos-origin.mozilla.org/serv/webmademovies/itvs/masbebes/1980_Sterilization_News_Map.webm">Nationwide <span class="year">1980</span></a>
</li>
<li data-active-during="181-189">
<a class="lightbox" href="http://labs.toolness.com/temp/mas-bebe/wilson.webm">California <span class="year">1994</span></a>
</li>
</ul>
</div>
<div class="pause-indicator ribbon" style="display: none">
Video paused.
<div class="instructions">Click to continue playback.</div>
</div>
<div class="titles"></div>
</div>
<script src="popcorn.js"></script>
<script src="jquery.min.js"></script>
<script src="instapoppin.js"></script>
<script src="instapoppin.jquery.js"></script>
<script src="constrain-aspect.jquery.js"></script>
<script>
// We want the year to show up in the frame as well as
// the timeline thumbnails. To avoid repeating ourselves in
// the HTML markup, we'll just do some DOM manipulation here.
$(".thumbnails div").clone().appendTo(".titles");
$(".titles div").children().not(".year").remove();
$(".titles .year").addClass('ribbon');
$(window).ready(function() {
var video = $(".primary-sync-source")[0];
// Always make sure our movie frame and the web content inside it
// are widescreen.
$(".content").constrainAspect(16, 9);
// Some browsers, most notably Mobile Safari on iPad, don't honor
// the autoplay attribute "to prevent unsolicited downloads over
// cellular networks at the user's expense", so we need to provide
// a UI to start the video.
//
// Unfortunately, said browsers don't offer a way to detect that
// they don't autoplay, so we'll have to resort to user-agent
// sniffing.
if (navigator.userAgent.match(/iPad/))
$(".pause-indicator").show();
// Clicking on the video should toggle pause/play.
$(video).mousedown(function() {
if (video.paused) {
$(".pause-indicator").hide();
video.play();
} else {
$(".pause-indicator").show();
video.pause();
}
});
// When user clicks on a timeline thumbnail, take the main video straight
// to its "chapter".
$(".thumbnails div").click(function goToChapterStart() {
video.currentTime = $(this).activeDurations(0).start;
});
// When a lightbox with a video is closed, continue playing the main
// video.
$(".lightbox-close-button").click(function closeLightbox() {
$("div.lightbox-overlay").fadeOut(function() {
$("div.lightbox-content").empty();
if (!$(video).data("wasVideoPaused"))
video.play();
});
});
// When the user clicks on a hyperlink that is meant to be played in
// a lightbox, prevent the default behavior and show the video in
// the lightbox.
$("a.lightbox").click(function showInLightbox() {
var lightboxVideo = $("<video autoplay controls>");
$(video).data("wasVideoPaused", video.paused);
video.pause();
lightboxVideo.attr("src", this.href);
lightboxVideo.bind("ended", function() {
$(".lightbox-close-button").click();
});
$("div.lightbox-content").append(lightboxVideo);
$("div.lightbox-overlay").fadeIn();
return false;
});
});
</script>