-
Notifications
You must be signed in to change notification settings - Fork 261
/
reggaegg.html
70 lines (54 loc) · 3.89 KB
/
reggaegg.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
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles/reggaegg.css">
<link rel="stylesheet" type="text/css" href="//www.bloomberg.com/graphics/assets/css/fonts.css"/>
</head>
<body>
<iframe id="music" width="20" height="15" src="//www.youtube.com/embed/0T3tg6Xwt7A?autoplay=1&rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
<div id="space">
<div class="stars"></div>
<div class="stars"></div>
<div class="stars"></div>
<div class="stars"></div>
<div class="stars"></div>
</div>
<div id="hashtag" class="blink">#CODEISSUE</div>
<div class="centerVert">
<div class="centerVertInner">
<img id="cool-egg" src="images/reggaegg1.gif">
</div>
</div>
<script src="scripts/libs/d3.v3.min.js"></script>
<script type="text/javascript">
d3.select("#cool-egg")
.on("mouseover", function() {
d3.select(this).attr("src", "images/reggaegg2.gif")
})
.on("mouseout", function() {
d3.select(this).attr("src", "images/reggaegg1.gif")
})
.on("click", function() {
if(d3.select(this).attr("src") == "images/reggaegg3.gif") {
d3.select(this).attr("src", "images/reggaegg1.gif")
} else {
d3.select(this).attr("src", "images/reggaegg3.gif")
}
})
var accessories = ["reggaegg_burg", "reggaegg_stereo", "reggaegg_pineapple"];
setInterval(function() {
var acc = accessories[Math.floor(Math.random()*accessories.length)];
d3.select("body").append("img")
.attr("src", "images/"+acc+".gif")
.classed("acc", true)
.style("left", (Math.random()*100).toFixed()+"%")
.style("top", (Math.random()*100).toFixed()+"%")
.style("opacity", 1)
.transition()
.duration(5000)
.style("opacity", 0)
.remove();
},1000)
console.log("\n \n _______ _______ _______ _______ _______ _______ _______ _______ _______ \n|\\ /|\\ /|\\ /|\\ /| |\\ /|\\ /|\\ /|\\ /|\\ /| \n| +---+ | +---+ | +---+ | +---+ | | +---+ | +---+ | +---+ | +---+ | +---+ | \n| | | | | | | | | | | | | | | | | | | | | | | | | | | | | \n| |L | | |O | | |V | | |E | | | |S | | |T | | |E | | |P | | |H | | \n| +---+ | +---+ | +---+ | +---+ | | +---+ | +---+ | +---+ | +---+ | +---+ | \n|/_____\\|/_____\\|/_____\\|/_____\\| |/_____\\|/_____\\|/_____\\|/_____\\|/_____\\| \n \n \n _______ _______ _______ _______ _______ _______ _______ \n|\\ /|\\ /|\\ /| |\\ /|\\ /|\\ /|\\ /| \n| +---+ | +---+ | +---+ | | +---+ | +---+ | +---+ | +---+ | \n| | | | | | | | | | | | | | | | | | | | | | | \n| |A | | |N | | |D | | | |T | | |O | | |P | | |H | | \n| +---+ | +---+ | +---+ | | +---+ | +---+ | +---+ | +---+ | \n|/_____\\|/_____\\|/_____\\| |/_____\\|/_____\\|/_____\\|/_____\\| \n \n \n _______ _______ _______ _______ _______ _______ _______ \n|\\ /|\\ /|\\ /| |\\ /|\\ /|\\ /|\\ /| \n| +---+ | +---+ | +---+ | | +---+ | +---+ | +---+ | +---+ | \n| | | | | | | | | | | | | | | | | | | | | | | \n| |A | | |N | | |D | | | |A | | |D | | |A | | |M | | \n| +---+ | +---+ | +---+ | | +---+ | +---+ | +---+ | +---+ | \n|/_____\\|/_____\\|/_____\\| |/_____\\|/_____\\|/_____\\|/_____\\| \n ")
</script>
</body>
</html>