generated from roberttwomey/generative-visual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
157 lines (119 loc) · 3.78 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
<!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>face2fake</title>
<style>
html,
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #fed;
}
h1 {
text-align: center;
}
h3 {
margin: 0;
}
.row {
display: grid;
grid-template-columns: repeat(8, 1fr);
}
.row img {
width: 100%;
margin: 0;
height: 100%;
transition: transform 0.3s;
}
.row img.active {
position: absolute;
top: calc((100vh - 100vmin) / 2);
left: calc((100vw - 100vmin) / 2);
height: 100vmin;
width: 100vmin;
}
.row p {
font-weight: lighter;
margin: 1em;
height: 3em;
border-bottom: 4px solid black;
}
</style>
</head>
<body>
<h1>face2fake</h1>
<h3>Real Faces</h3>
<div class="row">
<img src="img/real/obama.jpg" alt="">
<img src="img/real/Bill_Clinton_real.png" alt="">
<img src="img/real/ivanka.jpg" alt="">
<img src="img/real/cage.jpg" alt="">
<img src="img/real/serena-williams.jpg" alt="">
<img src="img/real/jackie.jpg" alt="">
<img src="img/real/twomey.jpg" alt="">
<img src="img/real/parker.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>10 epochs</h3>
<div class="row">
<img src="img/10ep/obama_fake.png" alt="">
<img src="img/10ep/clinton_fake.png" alt="">
<img src="img/10ep/ivanka_fake.png" alt="">
<img src="img/10ep/cage_fake.png" alt="">
<img src="img/10ep/serena-williams_fake.png" alt="">
<img src="img/10ep/jackie_fake.png" alt="">
<img src="img/10ep/twomey_fake.png" alt="">
<img src="img/10ep/parker_fake.png" alt="">
</div>
<h3>100 epochs</h3>
<div class="row">
<img src="img/100ep/obama_fake.png" alt="">
<img src="img/100ep/clinton_fake.png" alt="">
<img src="img/100ep/ivanka_fake.png" alt="">
<img src="img/100ep/cage_fake.png" alt="">
<img src="img/100ep/serena-williams_fake.png" alt="">
<img src="img/100ep/jackie_fake.png" alt="">
<img src="img/100ep/twomey_fake.png" alt="">
<img src="img/100ep/parker_fake.png" alt="">
</div>
<h3>160 epochs</h3>
<div class="row">
<img src="img/160ep/obama_fake.png" alt="">
<img src="img/160ep/clinton_fake.png" alt="">
<img src="img/160ep/ivanka_fake.png" alt="">
<img src="img/160ep/cage_fake.png" alt="">
<img src="img/160ep/serena-williams_fake.png" alt="">
<img src="img/160ep/jackie_fake.png" alt="">
<img src="img/160ep/twomey_fake.png" alt="">
<img src="img/160ep/parker_fake.png" alt="">
</div>
</body>
<script>
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>