-
Notifications
You must be signed in to change notification settings - Fork 55
/
index.html
82 lines (77 loc) · 1.75 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
<!doctype html>
<html>
<head>
<title>Blip</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
}
.blipchart {
background: #fff;
display: block;
}
.legend {
text-align: right;
padding-right: 2em;
padding-top: 1em;
padding-bottom: 1em;
font-family: Arial;
}
.legend span {
padding-left: 2em;
}
.dnslegend form {
display: inline;
}
.dnslegend form label {
margin: -2em;
padding: 2em;
font-weight: bold;
}
.dnslegend form label:hover {
background: #ff8;
}
</style>
</head>
<body>
<div class='legend'>
<a href='https://github.com/apenwarr/blip'>What's this?</a>
<span id='locallegend'></span>
<span id='internetlegend'></span>
<span class='dnslegend'>
<form>
<label for="wantdns">
<input type='checkbox' name='wantdns' id='wantdns'>
DNS
</label>
</form>
</span>
</div>
<canvas class='blipchart' id='hires'></canvas>
<canvas class='blipchart' id='lores'></canvas>
<canvas class='blipchart' id='vlores'></canvas>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
<script src='blip.js'></script>
<script>
var fixSize = function() {
var hmain = window.innerHeight - $('.legend')[0].clientHeight;
var h1 = Math.round(hmain * 0.05);
$('#hires').width(window.innerWidth).height(hmain - 3 * h1);
$('#lores').width(window.innerWidth).height(h1 * 2);
$('#vlores').width(window.innerWidth).height(h1);
}
$('#locallegend').css('color', localColor);
$('#internetlegend').css('color', internetColor);
$('.dnslegend').css('color', dnsColor);
$(window).resize(fixSize).ready(fixSize);
$('.blipchart').click(toggleBlip);
$('#wantdns').change(toggleDns);
start();
</script>
</body>
</html>