forked from richardkalehoff/FEF-UdaciMeals-Backbone
-
Notifications
You must be signed in to change notification settings - Fork 225
/
Copy pathindex.html
77 lines (70 loc) · 2.73 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Food Picker - Backbone</title>
<meta name="description" content="">
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="container">
<h1>UdaciMeals - Choose your stomach-filler!</h1>
<div id="app">
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Name</th>
<th>Rating</th>
<th>Calories</th>
<th>Select Item?</th>
</tr>
</thead>
<tbody id="table-body"></tbody>
</table>
<div id="selected-item"></div>
<div class="modal fade" id="itemDetails-modal" tabindex="-1" role="dialog" aria-labelledby="modalItemName"></div>
</div>
</div>
<script type="text/template" id="menuItem-template">
<td><a href="#detail/<%= menuItem.id %>"><%= menuItem.name %></a></td>
<td><%= menuItem.rating %></td>
<td><%= menuItem.calories %></td>
<td>
<button class="select-item">Select Item</button>
</td>
</script>
<script type="text/template" id="selectedItem-template">
<h2>Your selection</h2>
<% if ( !menuItem || !menuItem.selected ) { %>
<i>Aren't you hungry? You have not picked anything to eat yet.</i>
<% } else { %>
You are going to eat: <%= menuItem.name %> [<a href="#clear">clear</a>]
<% } %>
</script>
<script type="text/template" id="itemDetails-template">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="modalItemName"><%= menuItem.name %></h4>
</div>
<div class="modal-body">
<img src="img/<%= menuItem.image %>" alt="<%= menuItem.name %>" class="img-thumbnail" />
<p><%= menuItem.description %></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary select-item" data-dismiss="modal">Select Item</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</script>
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/backbone/backbone.js"></script>
<script src="js/app.js"></script>
</body>
</html>