generated from roberttwomey/ml-art-final
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
397 lines (313 loc) · 11.7 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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>These people do exist...</title>
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:200,400,600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=PT+Serif:400,700&display=swap" rel="stylesheet">
<style>
html,
body {
--text-color: #333;
font-family: "IBM Plex Sans", sans-serif;
color: var(--text-color);
background-color: #232f3c;
background-color: #f8f8f8;
margin-top: 0;
}
h1 {
text-align: center;
}
h3 {
margin: 0;
}
.hero {
height: 100vh;
text-align: center;
}
.hero .video-container {
position: relative;
height: 100vmin;
width: 100vmin;
margin: auto;
background-color: black;
}
.hero video {
height: 100%;
margin: 0;
background-color: black;
}
.hero .title {
/* --title-color: rgba(5, 0, 0, 0.9); */
--title-color: rgba(255, 255, 255, 0.9);
position: absolute;
top: 0;
left: 0.1em;
padding-right: 20%;
text-align: left;
font-size: 20vmin;
color: rgba(1, 1, 1, 0);
font-weight: bold;
text-shadow: 0px 0px 10px var(--title-color);
transition: text-shadow 0.1s;
animation-name: blurry;
animation-duration: 11s;
animation-iteration-count: infinite;
pointer-events: none;
}
@keyframes blurry {
0% {
text-shadow: 0px 0px 10px var(--title-color);
}
10% {
text-shadow: 0px 0px 20px var(--title-color);
}
30% {
text-shadow: 0px 0px 6px var(--title-color);
}
70% {
text-shadow: 0px 0px 11px var(--title-color);
}
100% {
text-shadow: 0px 0px 10px var(--title-color);
}
}
.page {
padding: 0.5em;
}
.row {
display: grid;
grid-template-columns: repeat(8, 1fr);
}
.row img {
width: 100%;
margin: 0;
height: 100%;
transition: transform 0.3s;
}
.row video {
width: 100%;
margin: 0;
height: 100%;
}
.row img.active {
position: absolute;
top: calc((100vh - 100vmin) / 2);
left: calc((100vw - 100vmin) / 2);
height: 100vmin;
width: 100vmin;
}
.row p {
font-weight: normal;
margin: 1em;
height: 3em;
border-bottom: 4px solid var(--text-color);
}
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.modal .content {
text-align: center;
margin: auto;
}
.modal video,
.modal img {
height: 100vmin;
width: 100vmin;
}
.divider {
height: 8em;
}
.footer {
text-align: center;
font-size: 12px;
color: #aaa;
padding: 8em 0;
}
.footer a {
text-decoration: none;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #aaa;
opacity: 1;
}
.footer a:hover {
opacity: 0.5;
}
code {
font-family: Consolas, Menlo, monospace;
font-size: 0.95em;
}
</style>
</head>
<body>
<div id="fullpage">
<div class="hero section">
<div class="video-container">
<video autoplay loop src="images/generated_images/loop/loop.mp4"></video>
<div class="title">
When faced with humanity
</div>
</div>
</div>
<div class="page section">
<h1>In an effort to create a human</h1>
<h3>Real Faces</h3>
<div class="row">
<img src="images/aligned_images/obama_01.png" alt="">
<img src="images/aligned_images/clinton_01.png" alt="">
<img src="images/aligned_images/ivanka_01.png" alt="">
<img src="images/aligned_images/cage_01.png" alt="">
<img src="images/aligned_images/serena_01.png" alt="">
<img src="images/aligned_images/jackie_01.png" alt="">
<img src="images/aligned_images/twomey_01.png" alt="">
<img src="images/aligned_images/parker_01.png" alt="">
</div>
<div class="row">
<p>Barack Obama</p>
<p>Bill Clinton</p>
<p>Ivanka Trump</p>
<p>Nicolas Cage</p>
<p>Serena Williams</p>
<p>Jackie Chan</p>
<p>Robert Twomey</p>
<p>Parker Addison</p>
</div>
<h3>With that, they are born.</h3>
<div class="row">
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/obama.mp4">
</div>
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/clinton.mp4">
</div>
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/ivanka.mp4">
</div>
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/cage.mp4">
</div>
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/serena.mp4">
</div>
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/jackie.mp4">
</div>
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/twomey.mp4">
</div>
<div class="vid-container">
<video loop src="images/generated_images/from_baseline/parker.mp4">
</div>
</div>
<div class="divider"></div>
<h3>100 iterations</h3>
<div class="row">
<img src="images/generated_images/100ep/obama_01.png" alt="">
<img src="images/generated_images/100ep/clinton_01.png" alt="">
<img src="images/generated_images/100ep/ivanka_01.png" alt="">
<img src="images/generated_images/100ep/cage_01.png" alt="">
<img src="images/generated_images/100ep/serena_01.png" alt="">
<img src="images/generated_images/100ep/jackie_01.png" alt="">
<img src="images/generated_images/100ep/twomey_01.png" alt="">
<img src="images/generated_images/100ep/parker_01.png" alt="">
</div>
<h3>500 iterations</h3>
<div class="row">
<img src="images/generated_images/500ep/obama_01.png" alt="">
<img src="images/generated_images/500ep/clinton_01.png" alt="">
<img src="images/generated_images/500ep/ivanka_01.png" alt="">
<img src="images/generated_images/500ep/cage_01.png" alt="">
<img src="images/generated_images/500ep/serena_01.png" alt="">
<img src="images/generated_images/500ep/jackie_01.png" alt="">
<img src="images/generated_images/500ep/twomey_01.png" alt="">
<img src="images/generated_images/500ep/parker_01.png" alt="">
</div>
<h3>1000 iterations</h3>
<div class="row">
<img src="images/generated_images/1000ep/obama_01.png" alt="">
<img src="images/generated_images/1000ep/clinton_01.png" alt="">
<img src="images/generated_images/1000ep/ivanka_01.png" alt="">
<img src="images/generated_images/1000ep/cage_01.png" alt="">
<img src="images/generated_images/1000ep/serena_01.png" alt="">
<img src="images/generated_images/1000ep/jackie_01.png" alt="">
<img src="images/generated_images/1000ep/twomey_01.png" alt="">
<img src="images/generated_images/1000ep/parker_01.png" alt="">
</div>
<h3>1500 iterations</h3>
<div class="row">
<img src="images/generated_images/1500ep/obama_01.png" alt="">
<img src="images/generated_images/1500ep/clinton_01.png" alt="">
<img src="images/generated_images/1500ep/ivanka_01.png" alt="">
<img src="images/generated_images/1500ep/cage_01.png" alt="">
<img src="images/generated_images/1500ep/serena_01.png" alt="">
<img src="images/generated_images/1500ep/jackie_01.png" alt="">
<img src="images/generated_images/1500ep/twomey_01.png" alt="">
<img src="images/generated_images/1500ep/parker_01.png" alt="">
</div>
<div class="divider"></div>
</div>
<div class="footer">
© 2019 <a href="https://parkeraddison.com">Parker Grey Addison</a>
|
<a href="https://github.com/ucsd-ml-arts/ml-art-final-parker-final"><code></></code> on
GitHub</a>
</div>
</div>
<div class="modal" id="modal">
<div class="content"></div>
</div>
</body>
<script>
let videos = document.querySelectorAll(".row video");
let images = document.querySelectorAll(".row img");
let modal = document.getElementById("modal");
let modalContent = document.querySelector(".modal .content");
window.onload = function () {
videos.forEach(function (elem) { elem.play() });
setInterval(function () {
videos.forEach(function (elem) { elem.currentTime = 0; });
}, 6000);
}
function modalify(elem) {
elem.addEventListener("click", function() {
modal.style.display = "block";
modalContent.innerHTML = '';
copy = elem.cloneNode();
modalContent.insertAdjacentElement("beforeend", copy);
if (elem.nodeName == "VIDEO") {
copy.play();
}
})
}
modalify(document.querySelector(".hero video"));
videos.forEach(modalify);
images.forEach(modalify);
modal.addEventListener("click", function() {
modal.style.display = "none";
})
// let imgs = document.querySelectorAll(".row img");
// function removeAllActive() {
// imgs.forEach(function (e) {
// e.classList.remove("active");
// });
// }
// imgs.forEach(function (elem) {
// elem.addEventListener("click", function () {
// isActive = this.classList.contains("active");
// removeAllActive();
// if (!isActive) {
// this.classList.add("active");
// }
// });
// });
</script>
</html>