-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbig.quickstart.html
83 lines (77 loc) · 2.12 KB
/
big.quickstart.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
<!DOCTYPE html><html><head><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /><style type='text/css'>
body {
font-family: 'Helvetica';
letter-spacing:-5px;
background:#000;
background-size:100%;
color:#fff;
margin:0;
padding:0;
font-weight:bold;
}
h1, h2, h3, p {
margin:0;
}
em, a {
font-style:normal;
color:#8dbd0c;
}
a {
background: #34d0e7;
color:#000;
text-decoration:none;
}
img {
width:100%;
}
div {
cursor:pointer;
cursor:hand;
position:absolute;
top:0;
left:0;
}
</style><script type='text/javascript'>
window.onload = function() {
var s = document.getElementsByTagName('div'), cur = 0;
if (!s) return;
function go(n) {
var i = 1e3;
for (var k = 0; k < s.length; k++) s[k].style.display = 'none';
s[n].style.display = 'inline';
s[n].style.fontSize = i + 'px';
if (s[n].firstChild.nodeName === 'IMG') {
document.body.style.backgroundImage = 'url(' + s[n].firstChild.src + ')';
s[n].firstChild.style.display = 'none';
} else {
document.body.style.backgroundImage = '';
}
while (
s[n].offsetWidth > window.innerWidth ||
s[n].offsetHeight > window.innerHeight) {
s[n].style.fontSize = (i -= 10) + 'px';
}
if (window.location.hash !== n) window.location.hash = n;
}
document.onclick = function() {
cur = ++cur % (s.length);
go(cur);
};
document.onkeydown = function(e) {
(e.which === 39) && go(cur = Math.min(s.length - 1, ++cur));
(e.which === 37) && go(cur = Math.max(0, --cur));
};
if (window.location.hash) cur = Math.max(
Math.min(
s.length - 1,
parseInt(window.location.hash.substring(1), 10)), 0) || cur;
window.onhashchange = function() {
var c = Math.max(Math.min(
s.length - 1,
parseInt(window.location.hash.substring(1), 10)), 0);
if (c !== cur) go(cur = c);
};
go(cur);
};
</script></head><body>
<div>welcome to <em>Big</em></div>