Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #20

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
这是一个很小的静态页面,用来庆祝我跟我mm相恋一周年纪念日。同时也为了以程序员的视角来表达浪漫,改变大家对于程序员先入为主的形象,程序员改变世界~
时间仓促,有很多没有考虑到的地方,大家可以自由的进行二次开发。
项目主页:http://love.hackerzhou.me

46 changes: 22 additions & 24 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,58 +20,56 @@
<div id="content">
<div id="code">
<span class="comments">/**</span><br />
<span class="space"/><span class="comments">* We are both Fudan SSers and programmers,</span><br />
<span class="space"/><span class="comments">* so I write some code to celebrate our 1st anniversary.</span><br />
<span class="space"/><span class="comments">* Write some code to celebrate our 1st Christmas.</span><br />
<span class="space"/><span class="comments">*/</span><br />
Boy i = <span class="keyword">new</span> Boy(<span class="string">"hackerzhou"</span>);<br />
Girl u = <span class="keyword">new</span> Girl(<span class="string">"MaryNee"</span>);<br />
<span class="comments">// Nov 2, 2010, I told you I love you. </span><br />
i.love(u);<br />
<span class="comments">// Luckily, you accepted and became my girlfriend eversince.</span><br />
u.accepted();<br />
<span class="comments">// Since then, I miss u every day.</span><br />
Boy i = <span class="keyword">new</span> Boy(<span class="string">"Xiaoyy"</span>);<br />
Girl u = <span class="keyword">new</span> Girl(<span class="string">"Meizhu"</span>);<br />
<span class="comments">// Oct 1, 2016, we exchanged wechat. </span><br />
i.meet(u);<br />
<span class="comments">// Luckily, I met u by our friends.</span><br />
u.attracted(i);<br />
<span class="comments">// Since then, I miss u every day and night.</span><br />
i.miss(u);<br />
<span class="comments">// And take care of u and our love.</span><br />
<span class="comments">// And take care of u and my love.</span><br />
i.takeCareOf(u);<br />
<span class="comments">// You say that you won't be so easy to marry me.</span><br />
<span class="comments">// So I keep waiting and I have confidence that you will.</span><br />
<span class="comments">// Whatever You say that you won't be so easy to accpet me.</span><br />
<span class="comments">// I keep waiting and I have confidence that you will.</span><br />
<span class="keyword">boolean</span> isHesitate = <span class="keyword">true</span>;<br />
<span class="keyword">while</span> (isHesitate) {<br />
<span class="placeholder"/>i.waitFor(u);<br />
<span class="placeholder"/><span class="comments">// I think it is an important decision</span><br />
<span class="placeholder"/><span class="comments">// and you should think it over.</span><br />
<span class="placeholder"/><span class="comments">// I think it is an important decision.</span><br />
<span class="placeholder"/><span class="comments">// Until then, i just want to make you happier, become a member in dailylife.</span><br />
<span class="placeholder"/>isHesitate = u.thinkOver();<br />
}<br />
<span class="comments">// After a romantic wedding, we will live happily ever after.</span><br />
i.marry(u);<br />
<span class="comments">// </span><br />
u.accepted(i);<br />
i.liveHappilyWith(u);<br />
</div>
<div id="loveHeart">
<canvas id="garden"></canvas>
<div id="words">
<div id="messages">
Minyue, I have fallen in love with you for
Meizhu, i have recogenized with you for
<div id="elapseClock"></div>
</div>
<div id="loveu">
Love u forever and ever.<br/>
<div class="signature">- hackerzhou</div>
Be with u forever.<br/>
<div class="signature">- xiaoyy</div>
</div>
</div>
</div>
</div>
<div id="copyright">
Inspired by <a href="http://www.openrise.com/lab/FlowerPower/">FlowerPower</a> project.<br />
Copyright © 2011 <a href='http://hackerzhou.me'>hackerzhou.me</a> 2009-2011
Copyright © 2016 <a href='https://github.com/xyy430104/'>xyy430104</a> 2016
</div>
</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.setFullYear(2016, 10, 1);
together.setHours(21);
together.setMinutes(15);
together.setSeconds(0);
together.setMilliseconds(0);

Expand Down
100 changes: 100 additions & 0 deletions index.html.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Our Love Story</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>
</head>

<body>
<div id="mainDiv">
<div id="content">
<div id="code">
<span class="comments">/**</span><br />
<span class="space"/><span class="comments">* I write some code to celebrate our 1st Christmas.</span><br />
<span class="space"/><span class="comments">*/</span><br />
Boy i = <span class="keyword">new</span> Boy(<span class="string">"Xiaoyy"</span>);<br />
Girl u = <span class="keyword">new</span> Girl(<span class="string">"Meizhu"</span>);<br />
<span class="comments">// Nov 2, 2010, I told you I love you. </span><br />
i.love(u);<br />
<span class="comments">// Luckily, I met u by our friends.</span><br />
u.accepted();<br />
<span class="comments">// Since then, I miss u every day and night.</span><br />
i.miss(u);<br />
<span class="comments">// And take care of u and my love.</span><br />
i.takeCareOf(u);<br />
<span class="comments">// Whatever You say that you won't be so easy to accpet me.</span><br />
<span class="comments">// I keep waiting and I have confidence that you will.</span><br />
<span class="keyword">boolean</span> isHesitate = <span class="keyword">true</span>;<br />
<span class="keyword">while</span> (isHesitate) {<br />
<span class="placeholder"/>i.waitFor(u);<br />
<span class="placeholder"/><span class="comments">// I think it is an important decision.</span><br />
<span class="placeholder"/><span class="comments">// Until then, i just want to make you happier, become a member in dailylife.</span><br />
<span class="placeholder"/>isHesitate = u.thinkOver();<br />
}<br />
<span class="comments">// </span><br />
i.marry(u);<br />
i.liveHappilyWith(u);<br />
</div>
<div id="loveHeart">
<canvas id="garden"></canvas>
<div id="words">
<div id="messages">
Meizhu, i have recogenized with you for
<div id="elapseClock"></div>
</div>
<div id="loveu">
Will be with u forever.<br/>
<div class="signature">- xiaoyy</div>
</div>
</div>
</div>
</div>
<div id="copyright">
Copyright © 2016 <a href='https://github.com/xyy430104/'>xyy430104</a> 2016
</div>
</div>
<script type="text/javascript">
var offsetX = $("#loveHeart").width() / 2;
var offsetY = $("#loveHeart").height() / 2 - 55;
var together = new Date();
together.setFullYear(2016, 10, 1);
together.setHours(21);
together.setMinutes(15);
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>