-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·99 lines (92 loc) · 4.36 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
<!DOCTYPE html>
<html>
<head>
<title>Merry X-mas</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
@font-face {
font-family: digit;
src: url('digital-7_mono.ttf') format("truetype");
}
</style>
<link href="css/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/garden.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script src="index.js"></script>
</head>
<style>
* {
padding: 0;
margin: 0;
}
</style>
<body onload='run()' style='background:black'>
<div id="tree">
<canvas id='scene' width='500px' height='500px' style='background:black'></canvas>
</div>
<div id="code">
<span class="comments">/**</span><br />
<span class="space"/><span class="comments">* We are both CQUer,</span><br />
<span class="space"/><span class="comments">* I am a coder ,So I wrote some code to celebrate our great friendship.</span><br />
<span class="space"/><span class="comments">*/</span><br />
Boy i = <span class="keyword">new</span> Boy(<span class="string">"Ma Jun"</span>);<br />
came from <span class="keyword">XinJiang</span> in <span class="keyword">2008</span>
<br />
Girl u = <span class="keyword">new</span> Girl(<span class="string">"Zhu Mengping"</span>);<br />
came from <span class="keyword">Hangzhou</span> in <span class="keyword">2012</span>
<br /><span class="comments">// May 19, 2013, I met u. </span><br />
i.like(u);<br />
<span class="comments">// It's a pity that I should leave CQU.</span><br />
time.flies();<br />
<span class="comments">// Since then, I miss u very much.</span><br />
i.miss(u);<br />
<span class="comments">// And i thought even can't meet u again'.</span><br />
i.sad();<br />
<span class="comments">// Luckly,now we r very comfortable friends.</span><br />
<span class="comments">// So I keep waiting to meet u again.</span><br />
<span class="keyword">boolean</span> isComeTrue = <span class="keyword">true</span>;<br />
<span class="keyword">while</span> (isComeTrue) {<br />
<span class="placeholder"/>i.waitFor(u);<br />
<span class="placeholder"/><span class="comments">// I think it is happy to be friend with u.</span><br />
<span class="placeholder"/><span class="comments">// and you should think it over.</span><br />
<span class="placeholder"/>isComeTrue = u.thinkOver();<br />
}<br />
<span class="comments">// After several days,i can see u.</span><br />
i.exciting();<br />
i.happy();<br />
Wish.u(too) <br /> <span class="keyword">-->Happy </span>everyday~
<br /><span class="keyword">Merry X-mas,Mengping~</span>
</div>
<script type="text/javascript">
var offsetX = $("#loveHeart").width() / 2;
var offsetY = $("#loveHeart").height() / 2 - 55;
var together = new Date();
together.setFullYear(2010, 10, 2);
together.setHours(20);
together.setMinutes(0);
together.setSeconds(0);
together.setMilliseconds(0);
if (!document.createElement('canvas').getContext) {
var msg = document.createElement("div");
msg.id = "errorMsg";
msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+";
document.body.appendChild(msg);
$("#code").css("display", "none")
$("#copyright").css("position", "absolute");
$("#copyright").css("bottom", "10px");
document.execCommand("stop");
} else {
setTimeout(function () {
startHeartAnimation();
}, 5000);
timeElapse(together);
setInterval(function () {
timeElapse(together);
}, 500);
adjustCodePosition();
$("#code").typewriter();
}
</script>
</body>
</html>