-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
executable file
·106 lines (81 loc) · 4.68 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
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>diy.js</title>
<meta name="description" content="A modern cross-platform JavaScript library & only 18 bytes">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<script src="js/diy.js"></script>
</head>
<body>
<div class="container">
<h1>diy.js</h1>
<p>
A modern cross-platform JavaScript library & only 18 bytes<br>
<small>...or just 10 bytes <a href="js/diy.min.js">minified</a></small>
</p>
<a href="js/diy.js" class="button button--large">Download Now</a>
<hr>
<h2>Examples</h2>
<h3>Click event</h3>
<div><pre><code>$.getElementById("demo1").addEventListener('click', function(){
alert('click');
});
</code></pre></div>
<span class="button" id="demo1">Try it!</span>
<hr class="hr--short">
<h3>Document width and height</h3>
<div><pre><code>console.log("Height: "+$.body.clientHeight);
console.log("Width: "+$.body.clientWidth);
</code></pre></div>
<small><i>See the console for output</i></small>
<hr class="hr--short">
<p>More examples and documentation can be found <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">here</a>.</p>
<hr>
<div class="faq">
<h2>FAQ</h2>
<h4>Hey bro, are you serious?</h4>
<p>Sure... I built diy.js because I wanted the flexibility to do anything but without the expensive weight of other JavaScript libraries.</p>
<h4>How long did diy.js take to develop?</h4>
<p>I've been developing diy.js for three years, about nine months of this was ensuring that diy.js was fully browser tested.</p>
<h4>What about tests?</h4>
<p>Testing is vital when you are running in many different environments. Thats why diy.js has 100% test coverage <a href="/test">check it out</a>.</p>
<h4>Where can I get the source code for diy.js?</h4>
<p>It's right <a href="js/diy.js">here</a> — have fun.</p>
<h4>How can I contact you?</h4>
<p>I'm on <a href="http://twitter.com/labfoo">Twitter</a>, <a href="http://github.com/adambutler">Github</a> or email me at adam<span class="visually-hidden">+diy</span>@lab.io</p>
</div>
</div>
<a href="https://github.com/adambutler/diy"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
</body>
<script>
$.getElementById("demo1").addEventListener('click', function(){
alert('click');
});
console.log("Height: "+$.body.clientHeight);
console.log("Width: "+$.body.clientWidth);
</script>
</html>