Skip to content

Commit de0cb61

Browse files
committed
Adding quickstart
1 parent ceb0e25 commit de0cb61

File tree

5 files changed

+88
-0
lines changed

5 files changed

+88
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
big.quickstart.html:
2+
cat build/1 big.css build/2 big.js build/3 > big.quickstart.html

big.quickstart.html

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!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'>
2+
body {
3+
font-family: 'Helvetica';
4+
letter-spacing:-5px;
5+
background:#000;
6+
color:#fff;
7+
margin:0;
8+
padding:0;
9+
font-weight:bold;
10+
}
11+
12+
h1, h2, h3, p {
13+
margin:0;
14+
}
15+
16+
em, a {
17+
font-style:normal;
18+
color:#8dbd0c;
19+
}
20+
21+
a {
22+
background: #34d0e7;
23+
color:#000;
24+
text-decoration:none;
25+
}
26+
27+
img {
28+
width:100%;
29+
}
30+
31+
div {
32+
cursor:pointer;
33+
cursor:hand;
34+
position:absolute;
35+
top:0;
36+
left:0;
37+
}
38+
</style><script type='text/javascript'>
39+
window.onload = function() {
40+
var s = document.getElementsByTagName('div'), cur = 0;
41+
if (!s) return;
42+
function go(n) {
43+
var i = 1e3;
44+
for (var k = 0; k < s.length; k++) s[k].style.display = 'none';
45+
s[n].style.display = 'inline';
46+
s[n].style.fontSize = i + 'px';
47+
if (s[n].firstChild.nodeName === 'IMG') {
48+
s[n].style.right = 0;
49+
s[n].style.bottom = 0;
50+
} else {
51+
while (
52+
s[n].offsetWidth > window.innerWidth ||
53+
s[n].offsetHeight > window.innerHeight) {
54+
i -= 10;
55+
s[n].style.fontSize = i + 'px';
56+
}
57+
}
58+
if (window.location.hash !== n) window.location.hash = n;
59+
}
60+
document.onclick = function() {
61+
cur = ++cur % (s.length);
62+
go(cur);
63+
};
64+
document.onkeydown = function(e) {
65+
(e.which === 39) && go(cur = Math.min(s.length - 1, ++cur));
66+
(e.which === 37) && go(cur = Math.max(0, --cur));
67+
};
68+
if (window.location.hash) cur = Math.max(
69+
Math.min(
70+
s.length - 1,
71+
parseInt(window.location.hash.substring(1), 10)), 0) || cur;
72+
window.onhashchange = function() {
73+
var c = Math.max(Math.min(
74+
s.length - 1,
75+
parseInt(window.location.hash.substring(1), 10)), 0);
76+
if (c !== cur) go(cur = c);
77+
};
78+
79+
go(cur);
80+
};
81+
</script></head><body>
82+
<div>welcome to <em>Big</em></div>

build/1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!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'>

build/2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
</style><script type='text/javascript'>

build/3

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
</script></head><body>
2+
<div>welcome to <em>Big</em></div>

0 commit comments

Comments
 (0)