forked from AlienceGG/a-limon.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
74 lines (68 loc) · 2.93 KB
/
index.html
File metadata and controls
74 lines (68 loc) · 2.93 KB
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="author" content="YangJian">
<meta name="description" content="YangJian's personal site">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="yangjiansky">
<meta name="twitter:title" content="Alimon">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link href='https://fonts.googleapis.com/css?family=Marck+Script' rel='stylesheet' type='text/css'>
<link href='stylesheet.css' rel="stylesheet" type="text/css">
<title>Alimon</title>
</head>
<body>
<div class="center">
<section class="main">
<h1>ALIMON</h1>
<h2>Yesterday You Said Tomorrow</h2>
<nav class="links">
<li><a href="http://weibo.com/436062867">Weibo</a></li>
<li><a href="https://twitter.com/yangjiansky">Twitter</a></li>
<li><a href="https://github.com/A-limon">Github</a></li>
<li><a href="https://medium.com/@yangjiansky">Blog</a></li>
<li><a href="https://www.zhihu.com/people/yangjiansky">Zhihu</a></li>
<li><a href="https://www.douban.com/people/yangjiansky">Douban</a></li>
<li><a href="https://cn.linkedin.com/in/yangjiansky">LinkedIn</a></li>
</nav>
</section>
</div>
<script>
document.addEventListener('DOMContentLoaded', function (e) {
function getDevicePixelRatio () {
var ratio = 1;
if (window.screen.systemXDPI !== undefined &&
window.screen.logicalXDPI !== undefined &&
window.screen.systemXDPI > window.screen.logicalXDPI) {
ratio = window.screen.systemXDPI / window.screen.logicalXDPI;
}
else if (window.devicePixelRatio !== undefined) {
ratio = window.devicePixelRatio;
}
return ratio;
}
function getRandomImg (width, height) {
var api = 'https://unsplash.it/';
return api + width.toString() + '/' + height.toString() + '?random&blur';
}
var width = window.innerWidth || document.documentElement.clientWidth;
var height = window.innerHeight || document.documentElement.clientHeight;
var pixelRatio = getDevicePixelRatio();
var backgroundImg = getRandomImg(width * pixelRatio , height * pixelRatio);
document.body.style.backgroundImage = 'url(' + backgroundImg +')';
}, false);
</script>
<script type="text/javascript">
setTimeout(function(){
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1766729-8', 'yangjian.me');
ga('send', 'pageview');
},1000);
</script>
</body>
</html>