-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
358 lines (301 loc) · 10.6 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Merry Christmas</title>
<style type="text/css">
body, html {
font-family: Helvetica, Arial, sans-serif;
color: #fff;
font-size: 11px;
width: 100%;
height: 100%;
background: #c00;
background: -moz-radial-gradient(center, ellipse cover, #c00 0%, #500 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#c00), color-stop(100%,#500));
background: -webkit-radial-gradient(center, ellipse cover, #c00 0%,#500 100%);
background: -o-radial-gradient(center, ellipse cover, #c00 0%,#500 100%);
background: -ms-radial-gradient(center, ellipse cover, #c00 0%,#500 100%);
background: radial-gradient(center, ellipse cover, #c00 0%,#500 100%);
}
@-webkit-keyframes snow {
0% { background-position: 0px 0px, 0px 0px, 0px 0px }
/*50% { background-color: #b4cfe0 }*/
100% {
background-position: 500px 1000px, 400px 400px, 300px 300px;
/*background-color: #6b92b9;*/
}
}
@-moz-keyframes snow {
0% { background-position: 0px 0px, 0px 0px, 0px 0px }
/*50% { background-color: #b4cfe0 }*/
100% {
background-position: 500px 1000px, 400px 400px, 300px 300px;
background-color: #6b92b9;
}
}
@-ms-keyframes snow {
0% { background-position: 0px 0px, 0px 0px, 0px 0px }
/*50% { background-color: #b4cfe0 }*/
100% {
background-position: 500px 1000px, 400px 400px, 300px 300px;
/*background-color: #6b92b9;*/
}
}
@keyframes snow {
0% { background-position: 0px 0px, 0px 0px, 0px 0px }
/*50% { background-color: #b4cfe0 }*/
100% {
background-position: 500px 1000px, 400px 400px, 300px 300px;
/*background-color: #6b92b9;*/
}
}
body {
-webkit-perspective: 5000px;
-moz-perspective: 5000px;
-ms-perspective: 5000px;
-o-perspective: 5000px;
perspective: 5000px;
-webkit-perspective-origin: 0 20%;
-moz-perspective-origin: 0 20%;
-ms-perspective-origin: 0 20%;
-o-perspective-origin: 0 20%;
perspective-origin: 0 20%;
-webkit-animation: snow 20s linear infinite;
-moz-animation: snow 20s linear infinite;
-ms-animation: snow 20s linear infinite;
animation: snow 20s linear infinite;
background-image: url('snow1.png'), url('snow2.png'), url('snow3.png');
}
/*--- steal from Ant Design ----*/
.christmas {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAAXCAYAAABOHMIhAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABiZJREFUeNrsWMtPlFcUvzPMwIDysLyRR4uATDHWCiVgSmRlios2DeiiXUFs0nRBd6arxqQhJDapkYXhP4BqDKT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gC2lpaVZ3Be67Th/dnZWoAJKsJC3XA8fPhxoamp6hMb+BaaMgWcUMGtszZjiFDNmvcDI91pzG0iY4ARwkwrxkcHBwUdgNrRMbnrqoRbkVzDcvn3bl5qaWsmcgFH4G8XdEGUWFhak51AuISFBnkoCTyFbyWKxCJwIxlC0fq2rq7tcVFRkRKskjh8/Lr0+kBjCCDV/knfdv3//WX19/R8IRRNemxlu4AXwKqM+EJwdj1HbPYSwh3sCPAJDABm2LLchCjS+5/kirKGhwWk0GrMuXrxYQuX9hm/XXTMXMY+srKwI5ApZrbYmZh7deEJhAUKjLe/pLTzSsCuHrK+1tbUJVe3P6upq87Vr174rKysrYHVj/uW+OH3IfEuw4F3ee/fuPQfAvwOs5yyE4CnlFOu7BWrTCWlreO6FACpBZGwUw4BvkANLobReHb3kGZYGsGzTq/zlO8AT1ru6uoZbWlqeA6gINJAfnz59OlVLoX8Jtebm5raampqfcMvQYgTknz9//sKVK1c+y83NTdIEuCnaKMuNGzd+6+np6cCtSTkAw9D9X8Dyh+dbgaaAC1XAnUlPTy+qqqq6cPbs2UzkmWjNljiDJzpwHFnCkW2yo6NjCKW8H54wjlezKvRT09LSTsJrz5w6dSoN+Yp51ADAPUj8VoDbDq9pxrwuJcNIYQllJTIi/xopBw/VA7DJp0+f9hA78CgL5F5C8J2CpoCj8sfA6WCe/FPRhsRlZmbGIs8Y4FFO5CJgtrSsvrRVGW1V93b1myoGnKAKEcHgnwsWpg1lNI0fphwrmdqbckeU18WrnlOjqp5/j7W3BWvfQVPKa5SBkcrYCNVB65TRTlWZ1lXiXVU5xbtlDb2SPaLWYwrgHIcqPg6Vc7fbX69Yoyqfa7/AeiegbWOEVhmsVcWDwPn224iDJgla8Hd38Hd3ELQgaIeI/hZgAIPEp0vmQJdoAAAAAElFTkSuQmCC);
background-repeat: no-repeat;
background-position: 50% -5px;
background-size: 64px;
opacity: 1;
}
/*---------------------*/
@-webkit-keyframes spin {
0% { -webkit-transform: rotateY( 0deg ); }
100% { -webkit-transform: rotateY( 360deg ); }
}
@-moz-keyframes spin {
0% { -moz-transform: rotateY( 0deg ); }
100% { -moz-transform: rotateY( 360deg ); }
}
@-ms-keyframes spin {
0% { -ms-transform: rotateY( 0deg ); }
100% { -ms-transform: rotateY( 360deg ); }
}
@-o-keyframes spin {
0% { -o-transform: rotateY( 0deg ); }
100% { -o-transform: rotateY( 360deg ); }
}
@keyframes spin {
0% { transform: rotateY( 0deg ); }
100% { transform: rotateY( 360deg ); }
}
#tree {
margin: 0 auto;
position: relative;
-webkit-animation: spin 20s infinite linear;
-moz-animation: spin 20s infinite linear;
-ms-animation: spin 20s infinite linear;
-o-animation: spin 20s infinite linear;
animation: spin 20s infinite linear;
-webkit-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
-ms-transform-origin: 50% 0;
-o-transform-origin: 50% 0;
transform-origin: 50% 0;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
}
#tree * {
position: absolute;
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-ms-transform-origin: 0 0;
-o-transform-origin: 0 0;
transform-origin: 0 0;
}
#branch {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
#text {
padding-top: 6px;
font-weight: bold;
}
.star {
border-color: #f1c40f transparent transparent transparent;
border-style: solid;
border-top-width: 35.21127px;
border-right-width: 50px;
border-left-width: 50px;
height: 0;
margin-top: 35.21127px;
margin-bottom: 22.63581px;
position: relative;
width: 0;
}
.star:before, .star:after {
border-color: #f1c40f transparent transparent transparent;
border-style: solid;
border-top-width: 35.21127px;
border-right-width: 50px;
border-left-width: 50px;
content: '';
display: block;
height: 0;
left: -50px;
position: absolute;
top: -35.21127px;
width: 0;
}
.star:before {
-webkit-transform: rotate(70deg);
transform: rotate(70deg);
}
.star:after {
-webkit-transform: rotate(-70deg);
transform: rotate(-70deg);
}
.star {
left: 200px;
top: 10px;
}
.title {
font-size: 72px;
font-weight: bold;
width: 100%;
text-align: center;
top: 150px;
word-spacing: 50px;
position: relative;
}
.poem {
font-size: 24px;
}
.poem,
.footer {
position: relative;
top: 200px;
width: 100%;
text-align: center;
}
.footer{
border-top: 1px solid #eee;
margin:50px 0px;
}
</style>
</head>
<body>
<audio controls loop autoplay>
<source src="we.wish.you.2.mp3" type="audio/mpeg">
</audio>
<div id="tree">
<div class="star"></div>
</div>
<div class="title">圣 诞 快 乐</div>
<div class="poem">
<p>We wish you a Merry Christmas;
<p>We wish you a Merry Christmas;
<p>We wish you a Merry Christmas
<p>And a Happy New Year.
<p>Good tidings we bring to you and your kin;
<p>Good tidings for Christmas and
<p>A Happy New Year.
</div>
<div class="footer christmas">
<p> Hao Chen @ <script>document.write(new Date().getFullYear())</script>
</div>
</body>
</html>
<script type="text/javascript">
var greeting = [
'printf("{0}");',
'cout << "{0}" << endl;',
'WriteLn("{0}");',
'System.out.println( "{0}" );',
'print "{0}"',
'fmt.Println("{0}");',
'echo "{0}"',
'say "{0}"',
'print("{0}");',
'(print "{0}")',
'PRINT "{0}"',
'<%= "{0}" %>',
'System.Console.WriteLine("{0}");',
'console.log("{0}");',
'document.write("{0}")',
];
var year = new Date().getFullYear()+1;
var str = ["Merry Christmas!", "Happy New Year!", "Hello "+year+"!"];
if (!String.prototype.format) {
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined'
? args[number]
: match
;
});
};
}
function transform( element, value ) {
element.style.WebkitTransform = value;
element.style.MozTransform = value;
element.style.msTransform = value;
element.style.OTransform = value;
element.style.transform = value;
}
function getRandom(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
function createBranch(width, height) {
div = document.createElement( 'div' );
span = document.createElement( 'span' );
s = greeting[getRandom(0, greeting.length - 1)].format(str[getRandom(0, str.length - 1)]);
text = document.createTextNode(s);
div.setAttribute("id", "branch");
div.setAttribute("class", "christmas");
span.setAttribute("id", "text");
span.appendChild(text);
div.appendChild(span);
div.style.width = width + 'px';
div.style.height = height + 'px';
var green = 50+Math.ceil(Math.random() * 200);
var other = Math.ceil(Math.random() * 50);
//console.log("rgba("+other+","+green+","+other+", 1)");
div.style.backgroundColor = "rgba("+other+","+green+","+other+", 1)";
//div.style.position = "relative";
return div;
}
var width = 500;
var height = 600;
var tree = document.getElementById("tree");
tree.style.width = width + 'px';
tree.style.height = height + 'px';
//tree.style.margin = "auto";
//tree.style.background = "#fefefe";
for ( i = 0; i<300; i++) {
var top_margin = 70;
var x = width/2;
var y = Math.round( Math.random() * height ) + top_margin;
var rx = 0;
var ry = Math.random() * 360;
var rz = 0;//-Math.random() * 15;
var elementWidth = 15 + ( ( (y - top_margin ) / height ) * width / 1.8 );
var elementHeight = 26;
//console.log(x, y, rx, ry, rz, elementWidth, elementHeight)
var div = createBranch(elementWidth, elementHeight);
transform(div, 'translate3d('+x+'px, '+y+'px, 0px) rotateX('+rx+'deg) rotateY('+ry+'deg) rotateZ('+rz+'deg)');
tree.appendChild( div );
}
</script>