-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
96 lines (77 loc) · 3.57 KB
/
index.html
File metadata and controls
96 lines (77 loc) · 3.57 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href="css/app.css" rel="stylesheet">
<script src="scripts/lib/jquery.js"></script>
<script src="scripts/lib/screenfull.js"></script>
</head>
<body>
<div class="device-xs visible-xs"></div>
<div class="device-sm visible-sm"></div>
<div class="device-md visible-md"></div>
<div class="device-lg visible-lg"></div>
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<a class="navbar-brand navbar-img-container" href="#">
<img class="navbar-img" src="img/powder2.png">
</a>
<a href="../" class="navbar-brand">DustDice</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="visible-xs-block container-fluid right">
<button type="button" class="btn btn-default navbar-btn expand-btn" onClick="expand()"><i class="fa fa-expand"></i></button>
</div>
</div>
</div>
<div id="graph-container"></div>
<div id="controls-container"></div>
<script data-main="scripts/config/config" src="scripts/lib/require.js"></script>
<script>
// (function($) {
// console.log('setting fn');
// $.fn.textWidth = function () {
// var $body = $('body');
// var $this = $(this);
// var $text = $this.text();
// if($text=='') $text = $this.val();
// var calc = '<div style="clear:both;display:block;visibility:hidden;"><span style="width;inherit;margin:0;font-family:' + $this.css('font-family') + ';font-size:' + $this.css('font-size') + ';font-weight:' + $this.css('font-weight') + '">' + $text + '</span></div>';
// $body.append(calc);
// var width = $body.find('span:last').width();
// $body.find('span:last').parent().remove();
// return width;
// };
// })(jQuery);
var textWidth = function (obj) {
var $body = $('body');
var $this = $(obj);
var $text = $this.text();
if($text=='') $text = $this.val();
var calc = '<div style="clear:both;display:block;visibility:hidden;"><span style="width;inherit;margin:0;font-family:' + $this.css('font-family') + ';font-size:' + $this.css('font-size') + ';font-weight:' + $this.css('font-weight') + '">' + $text + '</span></div>';
$body.append(calc);
var width = $body.find('span:last').width();
$body.find('span:last').parent().remove();
return width;
};
function resizeInput() {
$(this).width(textWidth(this));
}
$('input[type="text"]')
// event handler
.keyup(resizeInput)
// resize on page load
.each(resizeInput);
function expand() {
if (screenfull.enabled) {
screenfull.request();
}
}
</script>
</body>
</html>