Skip to content

Commit 8eafc0d

Browse files
committed
Site updated: 2018-08-17 00:28:01
1 parent 7b56f85 commit 8eafc0d

12 files changed

+3614
-1
lines changed

css/mylove/default.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
body{margin:0;padding:0;background:#ffe;font-size:14px;font-family:'微软雅黑','宋体',sans-serif;color:#231F20;overflow:auto}
2+
a {color:#000;font-size:14px;}
3+
#main{width:100%;}
4+
#wrap{position:relative;margin:0 auto;width:1100px;height:680px;margin-top:10px;}
5+
#text{width:400px;height:425px;left:60px;top:80px;position:absolute;}
6+
#code{display:none;font-size:16px;}
7+
#clock-box {position:absolute;left:60px;top:550px;font-size:28px;display:none;}
8+
#clock-box a {font-size:28px;text-decoration:none;}
9+
#clock{margin-left:48px;}
10+
#clock .digit {font-size:64px;}
11+
#canvas{margin:0 auto;width:1100px;height:680px;}
12+
#error{margin:0 auto;text-align:center;margin-top:60px;display:none;}
13+
.hand{cursor:pointer;}
14+
.say{margin-left:5px;}
15+
.space{margin-right:150px;}

css/mylove/functions.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* http://love.hackerzhou.me
3+
*/
4+
5+
// variables
6+
var $win = $(window);
7+
var clientWidth = $win.width();
8+
var clientHeight = $win.height();
9+
10+
$(window).resize(function() {
11+
var newWidth = $win.width();
12+
var newHeight = $win.height();
13+
if (newWidth != clientWidth && newHeight != clientHeight) {
14+
location.replace(location);
15+
}
16+
});
17+
18+
(function($) {
19+
$.fn.typewriter = function() {
20+
this.each(function() {
21+
var $ele = $(this), str = $ele.html(), progress = 0;
22+
$ele.html('');
23+
var timer = setInterval(function() {
24+
var current = str.substr(progress, 1);
25+
if (current == '<') {
26+
progress = str.indexOf('>', progress) + 1;
27+
} else {
28+
progress++;
29+
}
30+
$ele.html(str.substring(0, progress) + (progress & 1 ? '_' : ''));
31+
if (progress >= str.length) {
32+
clearInterval(timer);
33+
}
34+
}, 75);
35+
});
36+
return this;
37+
};
38+
})(jQuery);
39+
40+
function timeElapse(date){
41+
var current = Date();
42+
var seconds = (Date.parse(current) - Date.parse(date)) / 1000;
43+
var days = Math.floor(seconds / (3600 * 24));
44+
seconds = seconds % (3600 * 24);
45+
var hours = Math.floor(seconds / 3600);
46+
if (hours < 10) {
47+
hours = "0" + hours;
48+
}
49+
seconds = seconds % 3600;
50+
var minutes = Math.floor(seconds / 60);
51+
if (minutes < 10) {
52+
minutes = "0" + minutes;
53+
}
54+
seconds = seconds % 60;
55+
if (seconds < 10) {
56+
seconds = "0" + seconds;
57+
}
58+
var result = "第 <span class=\"digit\">" + days + "</span> 天 <span class=\"digit\">" + hours + "</span> 小时 <span class=\"digit\">" + minutes + "</span> 分钟 <span class=\"digit\">" + seconds + "</span> 秒";
59+
$("#clock").html(result);
60+
}

css/mylove/jquery.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mylove/jscex-async-powerpack.min.js

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mylove/jscex-async.min.js

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mylove/jscex-builderbase.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)