-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
89 lines (82 loc) · 3.13 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>MVC based Javascript calculator</title>
<!-- Application styles. -->
<link rel="stylesheet" href="styles/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="styles/index.css">
</head>
<body>
<!-- Application container. -->
<main id="calculator"></main>
<!-- Application templates. -->
<!-- Calculator Display template. -->
<script type="text/template" id="display-template">
<div class="row">
<div class="span4">
<input type="text" class="span4 text-right" value="<%= result %>" disabled="disabled" />
</div>
</div>
</script>
<!-- Calculator template. -->
<script type="text/template" id="app-template">
<div class="container">
<div class="row">
<div class="span4 offset4 display"><!-- Calculator Display placeholder. --></div>
</div>
<div class="row">
<div class="span1 offset6 btn-clear"></div>
<div class="span1 btn-divide"></div>
</div>
<div class="row">
<div class="span1 btn-7 offset4"></div>
<div class="span1 btn-8"></div>
<div class="span1 btn-9"></div>
<div class="span1 btn-multiply"></div>
</div>
<div class="row">
<div class="span1 btn-4 offset4"></div>
<div class="span1 btn-5"></div>
<div class="span1 btn-6"></div>
<div class="span1 btn-minus"></div>
</div>
<div class="row">
<div class="span1 btn-1 offset4"></div>
<div class="span1 btn-2"></div>
<div class="span1 btn-3"></div>
<div class="span1 btn-plus"></div>
</div>
<div class="row">
<div class="span1 offset5 btn-0 "></div>
<div class="span1 btn-dot"></div>
<div class="span1 btn-return"></div>
</div>
</div>
</script>
<!-- Calculator Button template. -->
<script type="text/template" id="button-template">
<div class="row">
<button class="btn span1 <%= className %>" data-value="<%= value %>">
<%= value %>
</div>
</div>
</script>
<!-- Application source. -->
<!-- Application libs. -->
<script src="js/libs/jquery-1.9.1.min.js"></script>
<script src="styles/bootstrap/js/bootstrap.min.js"></script>
<script src="js/libs/underscore-min.js"></script>
<script src="js/libs/backbone-min.js"></script>
<!-- Application models. -->
<script src="js/models/button.js"></script>
<script src="js/models/calculator.js"></script>
<!-- Application views. -->
<script src="js/views/display.js"></script>
<script src="js/views/button.js"></script>
<script src="js/views/app.js"></script>
<script src="js/main.js"></script>
</body>
</html>