forked from iissnan/iissnan.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
94 lines (85 loc) · 3.23 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
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Home page of shawnchenxmu</title>
<link rel="stylesheet" type="text/css" href="assets/css/main.css"/>
</head>
<body>
<div class="vi">
<div class="sidebar">
<div class="header">
<h1 class="animate-init"><img src='./source/avatar.jpeg' width="100px;" height="100px;"></h1>
<div class="quote">
<p class="quote-text animate-init">呜呼,生平求一敌手而不可得,诚寂寥难堪也。</p>
<!-- <p class="quote-author animate-init">《左传》 -->
</div>
</div>
<div class="menu">
<span class="animate-init"># 看书</span>
<span class="animate-init"># 健身</span>
<span class="animate-init"># 写代码</span>
<span class="animate-init"># 摸鱼</span><br>
<span class="animate-init"># 一个脱离了高级趣味的人</span>
</div>
<div class="menu">
<a href="https://github.com/shawnchenxmu" class="animate-init">GitHub</a>
<a href="http://shawnchenxmu.github.io" class="animate-init">Blog</a>
<a class="animate-init" id="WeChat">WeChat<img id="qrcode" src="./source/qrcode.jpg" /></a>
</div>
<div class="location">
<i class="location-icon"></i>
<span class="location-text animate-init">ShangHai - China</span>
</div>
<div class="relocating">
Navigating to: <span class="relocate-location"></span>...
</div>
</div>
<div class="content">
<span class="close">close</span>
</div>
</div>
<script type="text/javascript" src="assets/vendors/jquery/index.js"></script>
<script>
$(document).ready(function () {
var delay = 1;
var DELAY_STEP = 200;
var animationOptions = { opacity: 1, top: 0};
$('h1').animate(animationOptions).promise()
.pipe(animateMain)
.pipe(animateLocationIcon);
function animateMain() {
var dfd = $.Deferred();
var els = $('.animate-init');
var size = els.size();
els.each(function (index, el) {
delay++;
$(el).delay(index * DELAY_STEP)
.animate(animationOptions);
(size - 1 === index) && dfd.resolve();
});
return dfd.promise();
}
function animateLocationIcon() {
$('.location-icon').delay(delay * DELAY_STEP).animate({
opacity: 1,
top: 0
}).promise().done(animationQuote);
}
function animationQuote() {}
$(document.body).on('keydown', function (event) {
// Press 'b' key
if (event.which === 66) {
$('.relocate-location').text('Bookmark Page');
$('.relocating').css('opacity', 1);
window.setTimeout(function () {
window.location.href = '/bookmarks.html';
}, 1000);
}
});
});
</script>
</body>
</html>