-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeals.html
222 lines (221 loc) · 8.16 KB
/
meals.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<html lang="en">
<head>
<title>Meal Options</title>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.1.1/css/all.css"
integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="./index.css" />
</head>
<body>
<div class="container mt-4">
<!-- clearDBModal -->
<div
class="modal fade"
id="clearDBModal"
tabindex="-1"
role="dialog"
aria-labelledby="clearDBModalLabel"
aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="clearDBModalLabel">WARNING!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
This will remove all your meal ideas. Are you sure you want to continue?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button id="confirmClearBtn" type="button" class="btn btn-danger">Yes</button>
</div>
</div>
</div>
</div>
<!-- editRecordModal -->
<div
class="modal fade"
id="editRecordModal"
tabindex="-1"
role="dialog"
aria-labelledby="editRecordModalLabel"
aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="editRecordModalLabel">Edit this Meal</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<input type="text" id="modalMealTypeInput" name="modalMealTypeInput" hidden="true" />
<div class="form-group">
<label for="modalMealNameInput">Meal Name</label>
<input
type="text"
name="modalMealNameInput"
id="modalMealNameInput"
class="form-control"
aria-describedby="modalMealNameHelp"
/>
<small id="modalMealNameHelp" class="text-muted">Type in the new meal name</small>
</div>
<div class="form-group">
<label for="modalAddTagInput">Tags</label>
<input
type="text"
name="modalAddTagInput"
id="modalAddTagInput"
class="form-control"
aria-describedby="modalAddTagHelp"
/>
<small id="modalAddTagHelp" class="text-muted"
>Type in a new tag or comma separated list of tags</small
>
</div>
<div id="editModalTagList"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="deleteMealBtn" type="button" class="btn btn-warning">Delete</button>
<button id="saveMealBtn" type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-5">
<div class="row">
<div class="col-sm-2">
<a
name="homeBtn"
id="homeBtn"
class="btn btn-primary mt-2 mb-2"
href="./index.html"
role="button"
><i class="fa fa-home" aria-hidden="true"></i
></a>
</div>
<div class="col-sm-10">
<h1>Add a Meal</h1>
</div>
</div>
<div class="form-group">
<label for="mealInput">Meal Name</label>
<input
type="text"
name="mealInput"
id="mealInput"
class="form-control"
aria-describedby="mealHelp"
/>
<small id="mealHelp" class="text-muted"
>What's the name of this meal or restaurant?</small
>
</div>
<div class="form-group">
<label for="typeSelect">Meal Type</label>
<select
class="form-control"
name="typeSelect"
id="typeSelect"
aria-describedby="typeHelp"
>
<option selected></option>
<option value="in">Cook at Home</option>
<option value="out">Restaurant</option>
</select>
<small id="typeHelp" class="text-muted"> What kind of meal is this? </small>
</div>
<div class="form-group">
<label for="tagInput">Tags</label>
<input
type="text"
name="tagInput"
id="tagInput"
class="form-control"
placeholder=""
aria-describedby="tagHelp"
/>
<small id="tagHelp" class="text-muted"
>What are some tags to help decide later? Enter a comma separated list</small
>
</div>
<button id="doneBtn" type="button" class="btn btn-primary">Done</button>
</div>
<div class="col-sm-7">
<div class="row">
<div class="col-sm-6"><h1>Meals</h1></div>
<div class="col-sm-6">
<button id="resetBtn" type="button" class="btn btn-warning mb-2 mt-2 c-right">
Start Over
</button>
</div>
</div>
<div class="col-sm-12">
<table class="table table-hover">
<thead>
<tr>
<th>Meal</th>
<th>Type</th>
<th>Tags</th>
</tr>
</thead>
<tbody id="mealsTable"></tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"
integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg=="
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"
></script>
<script
defer
src="https://use.fontawesome.com/releases/v5.1.1/js/all.js"
integrity="sha384-BtvRZcyfv4r0x/phJt9Y9HhnN5ur1Z+kZbKVgzVBAlQZX4jvAuImlIz+bG7TS00a"
crossorigin="anonymous"
></script>
<script type="module">
import { init } from './js/meals.js';
$(document).ready(() => init());
</script>
</body>
</html>