-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
68 lines (44 loc) · 1.15 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
<!DOCTYPE html>
<html>
<head>
<!-- Set viewport size for mobile browsers !-->
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
<link rel="stylesheet" type="text/css" href="build/build.css" />
<link rel="stylesheet" type="text/css" href="build/build.css" />
<style type="text/css">
body, html{
margin:0;
padding:0;
border:0;
width:100%;
height:100%;
background-color: #333;
}
body{
position: absolute;
background-color: transparent;
}
#calculator-area{
position:relative;
width:250px;
height:500px;
top:50%;
left:50%;
margin-left:-125px;
margin-top:-250px;
}
</style>
</head>
<body>
<div id="calculator-area">
</div>
<script type="text/javascript" src="build/build.js"></script>
<script type="text/javascript">
var calculator = require("calculator");
var calc = calculator(undefined, {lib:'build/calculator/lib'});
calc.on('button pressed', function(result){ console.log(result); });
calc.on('confirm pressed', function(result){ console.log(result); });
document.getElementById('calculator-area').appendChild(calc);
</script>
</body>
</html>