-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (71 loc) · 2.79 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
<!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>LOOK AT ME</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="meeseeks meeseeks--arm-raise meeseeks--wobble" data-face="happy">
<div class="meeseeks__hair">
<span class="meeseeks__hair__strand"></span>
<span class="meeseeks__hair__strand"></span>
<span class="meeseeks__hair__strand"></span>
<span class="meeseeks__hair__strand"></span>
</div>
<div class="meeseeks__face">
<span class="meeseeks__face__eye meeseeks__face__eye--left"></span>
<span class="meeseeks__face__eye meeseeks__face__eye--right"></span>
<div class="meeseeks__face__mouth-open">
<div class="meeseeks__tooth--top meeseeks__tooth"></div>
<div class="meeseeks__tooth--top meeseeks__tooth"></div>
<div class="meeseeks__tooth--top meeseeks__tooth"></div>
<div class="meeseeks__tooth--top meeseeks__tooth"></div>
<div class="meeseeks__tooth--bottom meeseeks__tooth"></div>
<div class="meeseeks__tooth--bottom meeseeks__tooth"></div>
<div class="meeseeks__tooth--bottom meeseeks__tooth"></div>
<div class="meeseeks__tooth--bottom meeseeks__tooth"></div>
</div>
<div class="meeseeks__face__smile"></div>
<div class="meeseeks__face__chin"></div>
<div class="meeseeks__face__ooh"></div>
</div>
<div class="meeseeks__torso"></div>
<div class="meeseeks__full-arm meeseeks__full-arm--left">
<div class="meeseeks__limb meeseeks__arm meeseeks__arm--left"></div>
<div class="meeseeks__limb meeseeks__forearm meeseeks__forearm--left"></div>
</div>
<div class="meeseeks__full-arm meeseeks__full-arm--right">
<div class="meeseeks__limb meeseeks__arm meeseeks__arm--right"></div>
<div class="meeseeks__limb meeseeks__forearm meeseeks__forearm--right"></div>
</div>
<div class="meeseeks__limb meeseeks__leg meeseeks__leg--left"></div>
<div class="meeseeks__limb meeseeks__leg meeseeks__leg--right"></div>
<audio autoplay style="display: none;">
<source src="lookatme.wav">
</audio>
<audio id="can-do" style="display: none;">
<source src="cando.wav">
</audio>
<script>
var meeseeks = document.querySelector('.meeseeks');
var ooh = document.getElementById('can-do');
ooh.addEventListener('play', () => {
meeseeks.setAttribute('data-face', 'ooh');
});
ooh.addEventListener('ended', () => {
meeseeks.setAttribute('data-face', 'normal');
});
meeseeks.addEventListener('animationend', function(ev) {
if(ev.animationName === 'wobble') {
meeseeks.setAttribute('data-face', 'normal');
}
}, false);
meeseeks.addEventListener('click', function(ev) {
ooh.play();
});
</script>
</div></body>
</html>