-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.html
127 lines (110 loc) · 2.71 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content='emoji-rain' name='title' />
<title>emoji-rain</title>
<meta content='width=460' name='viewport'>
<meta content='text/html; charset=utf-8' http-equiv='content-type' />
<link href='http://fonts.googleapis.com/css?family=Lato:300,400' rel='stylesheet' type='text/css'>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../emoji-rain.html">
</head>
<body>
<emoji-rain id="rainmaker" drops="350"></emoji-rain>
<div class="container">
<section>
<h1>What is this even</h1>
<p>This is a Polymer element that you can drop on any web page and make it rain emoji.
Because, seriously, why wouldn't you?
</p>
</section>
<section>
<button onclick="rain(this, false)" id="button-rain">Make it rain!</button>
<input id="use-twemoji" type="checkbox" onclick="twemojiChanged(event)">
<span class="big">with Twitter emoji</span>
</section>
<div id="footer">
<p>made with <span style="color: #E91E63">❤︎</span> by <a href="https://twitter.com/notwaldorf">monica</a>.
find this on <a href="https://github.com/notwaldorf/emoji-rain">github</a></p>
</div>
</div>
</body>
<style>
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
font-weight: 300;
background: #fff;
color: #535353;
overflow: auto;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 50px;
overflow: auto;
text-align: center;
}
section {
margin-bottom: 50px;
}
#footer {
margin-top: 50px;
padding-top: 20px;
border-top: 2px solid #E91E63;
text-align: center;
text-transform: uppercase;
}
h1, button, .big {
font-family: 'Lato', 'Helvetica', Arial, sans-serif;
font-weight: 300;
font-size: 2em;
}
#footer p {
text-transform: uppercase;
font-size: 10px;
letter-spacing: .2em;
padding-right: 6px;
}
a:link, a:visited, button {
color: #E91E63;
text-decoration: none;
padding-bottom: 5px;
padding-top: 5px;
background: none;
border: none;
box-shadow: none;
outline:none;
}
a:hover, button:hover, a:focus, button:focus {
background-color: #E91E63;
color: white;
border-radius: 3px;
text-decoration: none;
}
::selection {
background: #F4FF81;
}
#use-twemoji {
width: 2em;
height: 2em;
}
</style>
<script>
var rainmaker = document.getElementById('rainmaker');
function rain(button) {
if (rainmaker.active) {
rainmaker.stop();
button.innerHTML = "Make it rain!";
} else {
rainmaker.start();
button.innerHTML = "OMG stop the rain!";
}
}
function twemojiChanged(event) {
rainmaker.useTwemoji = event.target.checked;
}
</script>
</html>