/
index.html
122 lines (95 loc) · 3.99 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale = 1.0,
maximum-scale=1.0, user-scalable=no">
<title>Health Tracker</title>
<!-- JavaScript Includes -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min.js"></script>
<!-- Google web fonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700" rel='stylesheet' />
<!-- bootstrap files -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<header>
<div class="row">
<div class="col-xs-12">
<h1>Health Tracker</h1>
</div>
</div>
</header>
<div class="search-app">
<div class="row">
<div class="col-sm-6">
<input placeholder="Enter a food" type='text' id='foodName' class="form-control added-margin-top">
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h3>Results:</h3>
<table class="table table-striped " >
<thead>
<tr><th>Item Name</th></tr>
<tr><th>Brand Name</th></tr>
<tr><th>Calories</th></tr>
<tr><th></th></tr>
</thead>
<tbody id="results">
</tbody>
</table>
</div>
</div>
</div>
<script type="text/template" id="search_template">
<tr>
<td><%= name %></td>
<td><%= brand %></td>
<td><%= calories %></td>
<td><button id=<%= id %> class="btn btn-primary add-button">Add</button></td>
</tr>
</script>
<div class="main-app">
<div class="row">
<div class="col-sm-12">
<h3>Items:</h3>
<table class="table table-striped " >
<thead>
<tr><th>Item Name</th></tr>
<tr><th>Brand Name</th></tr>
<tr><th>Calories</th></tr>
<tr><th></th></tr>
</thead>
<tbody id="items">
</tbody>
</table>
</div>
</div>
<script type="text/template" id="food_template">
<tr>
<td><%= name %></td>
<td><%= brand %></td>
<td><%= calories %></td>
<td><button class="btn btn-danger remove-button">Remove</button></td>
</tr>
</script>
<div class="row">
<div class="col-sm-12">
<h3>Total Calories: <span id="totalCalories">0</span></h3>
</div>
</div>
</div>
</div>
<script src="js/models/food.js"></script>
<script src="js/collections/foods.js"></script>
<script src="js/collections/search-foods.js"></script>
<script src="js/views/app-views.js"></script>
<script src="js/views/search-views.js"></script>
<script src="js/main.js"></script>
</body>
</html>