forked from ThirstyHead/groceryworks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
477 lines (458 loc) · 15.7 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
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GroceryWorks</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Scott Davis <scott.davis@thoughtworks.com>">
<meta name="description" content="GroceryWorks is a fictional grocery store website.">
<!-- Polyfill for dialog element -->
<link rel="stylesheet" href="css/dialog-polyfill.css">
<script defer src="js/dialog-polyfill.js"></script>
<link rel="stylesheet" href="css/index.css">
<script defer src="js/index.js"></script>
<!-- Template for adding items to the cart -->
<template id="cart-item">
<tr data-id="">
<td colspan="2" class="item-name"></td>
</tr>
<tr data-id="">
<td><span class="item-amount"></span> <span class="item-unit"></span></td>
<td class="item-total"></td>
</tr>
</template>
</head>
<body>
<header>
<span class="logo-first">Grocery</span><span class="logo-second">Works</span>
</header>
<div class="container">
<!-- Sidebar -->
<div class="sidebar">
<div class="switch-field">
<input type="radio" id="beans" name="item-filter" value="beans" checked/>
<label for="beans">Beans</label>
<input type="radio" id="nuts" name="item-filter" value="nuts" />
<label for="nuts">Nuts</label>
<input type="radio" id="pasta" name="item-filter" value="pasta" />
<label for="pasta">Pasta</label>
<input type="radio" id="produce" name="item-filter" value="produce" />
<label for="produce">Produce</label>
</div>
</div>
<!-- Main -->
<main>
<label class="item" data-category="beans">
<input type="checkbox" value="flax-seeds">
<img src="img/beans/flax-seeds_200px.jpg"
alt="Flax Seeds">
<p>
Flax Seeds
<span class="price">$0.59 / lb</span>
</p>
</label>
<label class="item" data-category="beans">
<input type="checkbox" value="french-green-lentils">
<img src="img/beans/french-green-lentils_200px.jpg"
alt="French Green Lentils">
<p>
French Green Lentils
<span class="price">$0.99 / lb</span>
</p>
</label>
<label class="item" data-category="beans">
<input type="checkbox" value="green-split-peas">
<img src="img/beans/green-split-peas_200px.jpg"
alt="Green Split Peas">
<p>
Green Split Peas
<span class="price">$0.59 / lb</span>
</p>
</label>
<label class="item" data-category="beans">
<input type="checkbox" value="lentils">
<img src="img/beans/lentils_200px.jpg"
alt="Lentils">
<p>
Lentils
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="beans">
<input type="checkbox" value="pinto-beans">
<img src="img/beans/pinto-beans_200px.jpg"
alt="Pinto Beans">
<p>
Pinto Beans
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="beans">
<input type="checkbox" value="white-navy-beans">
<img src="img/beans/white-navy-beans_200px.jpg"
alt="White Navy Beans">
<p>
White Navy Beans
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="beans">
<input type="checkbox" value="yellow-split-peas">
<img src="img/beans/yellow-split-peas_200px.jpg"
alt="Yellow Split Peas">
<p>
Yellow Split Peas
<span class="price">$0.59 / lb</span>
</p>
</label>
<label class="item" data-category="nuts">
<input type="checkbox" value="peanuts">
<img src="img/nuts/peanuts_200px.jpg"
alt="Peanuts">
<p>
Peanuts
<span class="price">$1.89 / lb</span>
</p>
</label>
<label class="item" data-category="nuts">
<input type="checkbox" value="pistachios">
<img src="img/nuts/pistachios_200px.jpg"
alt="Pistachios">
<p>
Pistachios
<span class="price">$9.99 / lb</span>
</p>
</label>
<label class="item" data-category="nuts">
<input type="checkbox" value="roasted-cashews">
<img src="img/nuts/roasted-cashews_200px.jpg"
alt="Roasted Cashews">
<p>
Roasted Cashews
<span class="price">$12.89 / lb</span>
</p>
</label>
<label class="item" data-category="nuts">
<input type="checkbox" value="sunflower-seeds">
<img src="img/nuts/sunflower-seeds_200px.jpg"
alt="Sunflower Seeds">
<p>
Sunflower Seeds
<span class="price">$1.49 / lb</span>
</p>
</label>
<label class="item" data-category="nuts">
<input type="checkbox" value="toasted-pumpkin-seeds">
<img src="img/nuts/toasted-pumpkin-seeds_200px.jpg"
alt="Toasted Pumpkin Seeds">
<p>
Toasted Pumpkin Seeds
<span class="price">$2.99 / lb</span>
</p>
</label>
<label class="item" data-category="pasta">
<input type="checkbox" value="egg-noodles">
<img src="img/pasta/egg-noodles_200px.jpg"
alt="Egg Noodles">
<p>
Egg Noodles
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="pasta">
<input type="checkbox" value="jasmine-rice">
<img src="img/pasta/jasmine-rice_200px.jpg"
alt="Jasmine Rice">
<p>
Jasmine Rice
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="pasta">
<input type="checkbox" value="macaroni">
<img src="img/pasta/macaroni_200px.jpg"
alt="Macaroni">
<p>
Macaroni
<span class="price">$0.49 / lb</span>
</p>
</label>
<label class="item" data-category="pasta">
<input type="checkbox" value="mini-shells">
<img src="img/pasta/mini-shells_200px.jpg"
alt="Mini Shells">
<p>
Mini Shells
<span class="price">$0.49 / lb</span>
</p>
</label>
<label class="item" data-category="pasta">
<input type="checkbox" value="penne">
<img src="img/pasta/penne_200px.jpg"
alt="Penne">
<p>
Penne
<span class="price">$0.49 / lb</span>
</p>
</label>
<label class="item" data-category="pasta">
<input type="checkbox" value="rotini">
<img src="img/pasta/rotini_200px.jpg"
alt="Rotini">
<p>
Rotini
<span class="price">$0.49 / lb</span>
</p>
</label>
<label class="item" data-category="pasta">
<input type="checkbox" value="short-grain-brown-rice">
<img src="img/pasta/short-grain-brown-rice_200px.jpg"
alt="Short Grain Brown Rice">
<p>
Short Grain Brown Rice
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="avocados">
<img src="img/produce/avocados_200px.jpg"
alt="Avocados">
<p>
Avocados
<span class="price">$1.29 / each</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="bell-peppers">
<img src="img/produce/bell-peppers_200px.jpg"
alt="Bell Peppers">
<p>
Bell Peppers
<span class="price">$1.49 / each</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="brussels-sprouts">
<img src="img/produce/brussels-sprouts_200px.jpg"
alt="Brussels Sprouts">
<p>
Brussels Sprouts
<span class="price">$2.99 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="concord-grapes">
<img src="img/produce/concord-grapes_200px.jpg"
alt="Concord Grapes">
<p>
Concord Grapes
<span class="price">$2.49 / each</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="cranberries">
<img src="img/produce/cranberries_200px.jpg"
alt="Cranberries">
<p>
Cranberries
<span class="price">$2.49 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="eggplant">
<img src="img/produce/eggplant_200px.jpg"
alt="Eggplant">
<p>
Eggplant
<span class="price">$1.49 / each</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="gala-apples">
<img src="img/produce/gala-apples_200px.jpg"
alt="Gala Apples">
<p>
Gala Apples
<span class="price">$1.49 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="granny-smith-apples">
<img src="img/produce/granny-smith-apples_200px.jpg"
alt="Granny Smith Apples">
<p>
Granny Smith Apples
<span class="price">$1.69 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="grapefruit">
<img src="img/produce/grapefruit_200px.jpg"
alt="Grapefruit">
<p>
Grapefruit
<span class="price">$0.99 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="green-tomatoes">
<img src="img/produce/green-tomatoes_200px.jpg"
alt="Green Tomatoes">
<p>
Green Tomatoes
<span class="price">$2.69 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="limes">
<img src="img/produce/limes_200px.jpg"
alt="Limes">
<p>
Limes
<span class="price">$0.59 / each</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="mushrooms">
<img src="img/produce/mushrooms_200px.jpg"
alt="Mushrooms">
<p>
Mushrooms
<span class="price">$3.99 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="onions">
<img src="img/produce/onions_200px.jpg"
alt="Onions">
<p>
Onions
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="oranges">
<img src="img/produce/oranges_200px.jpg"
alt="Oranges">
<p>
Oranges
<span class="price">$0.89 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="peaches">
<img src="img/produce/peach_200px.jpg"
alt="Peaches">
<p>
Peaches
<span class="price">$1.29 / each</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="potatoes">
<img src="img/produce/potatoes_200px.jpg"
alt="Potatoes">
<p>
Potatoes
<span class="price">$0.79 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="red-apples">
<img src="img/produce/red-apples_200px.jpg"
alt="Red Apples">
<p>
Red Apples
<span class="price">$1.69 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="red-cherries">
<img src="img/produce/red-cherries_200px.jpg"
alt="Red Cherries">
<p>
Red Cherries
<span class="price">$7.99 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="spinach">
<img src="img/produce/spinach_200px.jpg"
alt="Spinach">
<p>
Spinach
<span class="price">$2.49 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="tangerines">
<img src="img/produce/tangerines_200px.jpg"
alt="Tangerines">
<p>
Tangerines
<span class="price">$2.89 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="tomatoes">
<img src="img/produce/tomatoes_200px.jpg"
alt="Tomatoes">
<p>
Tomatoes
<span class="price">$1.89 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="vine-ripened-tomatoes">
<img src="img/produce/vine-ripened-tomatoes_200px.jpg"
alt="Vine-Ripened Tomatoes">
<p>
Vine-Ripened Tomatoes
<span class="price">$2.89 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="yams">
<img src="img/produce/yams_200px.jpg"
alt="Yams">
<p>
Yams
<span class="price">$0.99 / lb</span>
</p>
</label>
<label class="item" data-category="produce">
<input type="checkbox" value="yukon-gold-potatoes">
<img src="img/produce/yukon-gold-potatoes_200px.jpg"
alt="Yukon Gold Potatoes">
<p>
Yukon Gold Potatoes
<span class="price">$1.49 / lb</span>
</p>
</label>
</main>
<!-- Shopping Cart -->
<div class="cart">
<button class="purchase-button">Purchase</button>
<table class="cart-table">
<caption>Your Order</caption>
<thead>
<tr>
<td>Total</td>
<td class="cart-total">$0.00</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
<dialog id="checkout-dialog">
<header>
<span class="dialog-buttons">
<button id="place-order-button">Place Order</button>
<button id="cancel-order-button">Cancel</button>
</span>
</header>
<div class="dialog-body"></div>
</dialog>
</div>
</body>
</html>