-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
380 lines (380 loc) · 25.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shoppr</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Shopping list generator">
<meta name="author" content="Shoppr">
<!-- Favicons -->
<link rel="icon" href="assets/images/favicon.svg" sizes="any" type="image/svg+xml">
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/iphonefavicon.png">
<link rel="icon" sizes="192x192" href="assets/images/androidfavicon.png">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<!-- External CSS -->
<link href="assets/style.css" rel="stylesheet">
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
<!-- Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<!-- EmailJS -->
<script src="https://cdn.jsdelivr.net/npm/emailjs-com@2/dist/email.min.js"></script>
</head>
<body>
<!-- MODAL POPUP -->
<div id="modal-container" class="d-xl-none d-lg-none d-md-none col-12">
<div class="text-center popup-alert">
<div id="modal-bar" class="py-4"><i class="fas fa-shopping-basket"></i><span id="modal-text"></span></div>
</div>
</div>
<!-- MAIN CONTENT AREA -->
<div id="main" class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-5" id="menu-controls">
<div class="row text-center my-4">
<div class="col-12">
<h1 class="my-0">Shoppr <i class="fas fa-shopping-basket"></i></h1>
</div>
</div>
<div class="row justify-content-center">
<div class="col-6 text-right">
<button id="help-btn" class="nav-btn my-2 h4" data-toggle="modal" data-target="#helpModal">Help <i class="fas fa-info-circle"></i></button>
</div>
<div class="col-6 text-left">
<button id="settings-btn" class="nav-btn collapsed my-2 h4" aria-expanded="false" data-toggle="collapse" data-target="#settings-content">Settings <i class="fas fa-cog"></i><i class="fas fa-level-down-alt"></i></button>
</div>
</div>
<!-- HELP MODAL -->
<div class="modal fade" tabindex="-1" id="helpModal" role="dialog" aria-labelledby="helpModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="helpModalLabel">Guide</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>This shopping list is designed to allow you to add items to your list in order of the sections within your supermarket <em>(eg. front shelves, fridges)</em>. This is so you can follow your list in the same order as your supermarket layout.</p>
<p>If you rename the locations, this will be remembered the next time you visit Shoppr. Previously entered items will also be suggested in the future when you start to type the same item name again.</p>
<p>The option is there to download your shopping list as a CSV file, which will let you import it back into Shoppr in the future if you wanted to re-use a particular list.</p>
<p>If you need to share the list with someone else, you can email it to them or if you want to view the list on another device you can email it to yourself.</p>
<p>The email will contain the shopping list within it but it will also attach the CSV so you can import it back into Shoppr on another device.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- DOWNLOAD MODAL -->
<div class="modal fade" tabindex="-1" id="downloadModal" role="dialog" aria-labelledby="downloadModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="downloadModalLabel">Download CSV</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Your shopping list file has been downloaded.</p>
<p>The file is in a CSV format, so it can be imported into spreadsheet software such as Microsoft Excel or Apple Numbers.<p>
<p>The delimiter used to separate the item values is a pipe ( | ) character so that commas can be used within item names.</p>
<p>The first 6 items within the CSV are the location names, so if you choose to create your own they will be retained when you export your list.</p>
<p>However, we think your downloaded shopping list is best seen when importing it back into Shoppr, so feel free to make use of the Import button to visit previous lists.</p>
</div>
<div class="modal-footer">
<button id="modalDownloadClose" type="button" class="px-4 btn btn-secondary" data-dismiss="modal">Close</button>
<a id="modalDownloadBtn" class="btn btn-primary" href="#" download="shoppr-export.csv" role="button">Download again</a>
</div>
</div>
</div>
</div>
<!-- SETTINGS DROPDOWN MENU -->
<div id="settings-content" class="collapse text-center">
<div class="col-12">
<button id="autoSuggestToggle" class="options-btn"></button>
</div>
<div class="col-12">
<button id="clear-autofill" class="options-btn"><i class="fas fa-align-left mx-2"></i> Clear auto-suggestions</button>
</div>
<div class="col-12">
<button id="emptyShoppingList" class="options-btn"><i class="far fa-trash-alt mx-2"></i> Empty shopping list</button>
</div>
<div class="col-12">
<button id="resetLocations" class="options-btn"><i class="fas fa-undo-alt mx-2"></i> Reset item locations to default</button>
</div>
</div>
<!-- INPUT AREA -->
<div class="row my-3 justify-content-center">
<h4>1. Add an item:</h4>
</div>
<div class="row mx-0 my-2 input-row">
<div class="col px-0">
<input type="text" id="item-name" maxlength="18" class="text-left pl-4" aria-label="Type item name" placeholder="Type item name">
</div>
<div id="decreaseCol" class="col-1 mx-0 px-0">
<button id="minus-btn" aria-label="Reduce quantity by 1">-</button>
</div>
<div id="quantityCol" class="col-1 mx-0 my-auto text-center px-0">
<div id="quantity-counter" aria-label="Current quantity">1</div>
</div>
<div id="increaseCol" class="col-1 px-0">
<button id="plus-btn" aria-label="Increase quantity by 1">+</button>
</div>
</div>
<div class="container py-2 mt-2 location-container">
<div class="row text-center mt-2">
<div class="col-12 my-2">
<h4>2. Select item location:</h4>
</div>
</div>
<!-- LOCATION BUTTONS -->
<div class="row">
<div class="col-10 mb-2 px-0">
<button class="p-2 location-btn-0 center location-buttons hover" aria-label="Add item to table 1"></button>
</div>
<div class="col-2 mb-2 px-0">
<button class="p-2 location-edit-btn-0 location-buttons location-edit" aria-label="Edit table 1 name"><i class="px-2 fas fa-pencil-alt"></i></button>
</div>
</div>
<div class="row">
<div class="col-10 mb-2 px-0">
<button class="p-2 location-btn-1 center location-buttons hover" aria-label="Add item to table 2"></button>
</div>
<div class="col-2 mb-2 px-0">
<button class="p-2 location-edit-btn-1 location-buttons location-edit" aria-label="Edit table 2 name"><i class="px-2 fas fa-pencil-alt"></i></button>
</div>
</div>
<div class="row">
<div class="col-10 mb-2 px-0">
<button class="p-2 location-btn-2 center location-buttons hover" aria-label="Add item to table 3"></button>
</div>
<div class="col-2 mb-2 px-0">
<button class="p-2 location-edit-btn-2 location-buttons location-edit" aria-label="Edit table 3 name"><i class="px-2 fas fa-pencil-alt"></i></button>
</div>
</div>
<div class="row">
<div class="col-10 mb-2 px-0">
<button class="p-2 location-btn-3 center location-buttons hover" aria-label="Add item to table 4"></button>
</div>
<div class="col-2 mb-2 px-0">
<button class="p-2 location-edit-btn-3 location-buttons location-edit" aria-label="Edit table 4 name"><i class="px-2 fas fa-pencil-alt"></i></button>
</div>
</div>
<div class="row">
<div class="col-10 mb-2 px-0">
<button class="p-2 location-btn-4 center location-buttons hover" aria-label="Add item to table 5"></button>
</div>
<div class="col-2 mb-2 px-0">
<button class="p-2 location-edit-btn-4 location-buttons location-edit" aria-label="Edit table 5 name"><i class="px-2 fas fa-pencil-alt"></i></button>
</div>
</div>
<div class="row">
<div class="col-10 px-0">
<button class="p-2 location-btn-5 center location-buttons hover" aria-label="Add item to table 6"></button>
</div>
<div class="col-2 px-0">
<button class="p-2 location-edit-btn-5 location-buttons location-edit" aria-label="Edit table 6 name"><i class="px-2 fas fa-pencil-alt"></i></button>
</div>
</div>
</div>
</div>
<!-- SHOPPING LIST TABLES -->
<div class="col-md-7 d-block d-xs-block d-sm-block d-md-block my-2 px-4" id="shopping-list">
<div id="hero-banner" class="row">
<div id="banner-img"><span class="h1 table-title"></span></div>
<div id="open-close"><h6 class="open-close-btn"><span class="open-close-text">Open all </span><i class="fas fa-level-down-alt"></i></h6></div>
</div>
<div class="row">
<div id="accordion">
<!-- FIRST LOCATION TABLE HEADER -->
<div class="card my-2">
<div class="card-header p-0">
<span class="float-left my-0">
<a class="btn btn-link" aria-label="table title" data-toggle="collapse" data-target="#collapse0">
<span class="h5 m-0 table-header header0"></span>
</a>
</span>
<span class="float-right my-0">
<a id="header0-complete" aria-label="number of items in table" class="btn btn-link" data-toggle="collapse" data-target="#collapse0">0</a>
</span>
</div>
<!-- FIRST LOCATION TABLE -->
<div id="collapse0" class="collapse" data-parent="#accordion">
<div class="card-body p-0">
<div class="row text-center m-0">
<table id="table-0" class="table m-0"></table>
</div>
</div>
</div>
</div>
<!-- SECOND LOCATION TABLE HEADER -->
<div class="card my-2">
<div class="card-header p-0">
<span class="float-left my-0">
<a class="btn btn-link" aria-label="table title" data-toggle="collapse" data-target="#collapse1">
<span class="h5 m-0 table-header header1"></span>
</a>
</span>
<span class="float-right my-0">
<a id="header1-complete" aria-label="number of items in table" class="btn btn-link" data-toggle="collapse" data-target="#collapse1">0</a>
</span>
</div>
<!-- SECOND LOCATION TABLE -->
<div id="collapse1" class="collapse" data-parent="#accordion">
<div class="card-body p-0">
<div class="row text-center m-0">
<table id="table-1" class="table m-0"></table>
</div>
</div>
</div>
</div>
<!-- THIRD LOCATION TABLE HEADER -->
<div class="card my-2">
<div class="card-header p-0">
<span class="float-left my-0">
<a class="btn btn-link" aria-label="table title" data-toggle="collapse" data-target="#collapse2">
<span class="h5 m-0 table-header header2"></span>
</a>
</span>
<span class="float-right my-0">
<a id="header2-complete" aria-label="number of items in table" class="btn btn-link" data-toggle="collapse" data-target="#collapse2">0</a>
</span>
</div>
<!-- THIRD LOCATION TABLE -->
<div id="collapse2" class="collapse" data-parent="#accordion">
<div class="card-body p-0">
<div class="row text-center m-0">
<table id="table-2" class="table m-0"></table>
</div>
</div>
</div>
</div>
<!-- FOURTH LOCATION TABLE HEADER -->
<div class="card my-2">
<div class="card-header p-0">
<span class="float-left my-0">
<a class="btn btn-link" aria-label="table title" data-toggle="collapse" data-target="#collapse3">
<span class="h5 m-0 table-header header3"></span>
</a>
</span>
<span class="float-right my-0">
<a id="header3-complete" aria-label="number of items in table" class="btn btn-link" data-toggle="collapse" data-target="#collapse3">0</a>
</span>
</div>
<!-- FOURTH LOCATION TABLE -->
<div id="collapse3" class="collapse" data-parent="#accordion">
<div class="card-body p-0">
<div class="row text-center m-0">
<table id="table-3" class="table m-0"></table>
</div>
</div>
</div>
</div>
<!-- FIFTH LOCATION TABLE HEADER -->
<div class="card my-2">
<div class="card-header p-0">
<span class="float-left my-0">
<a class="btn btn-link" aria-label="table title" data-toggle="collapse" data-target="#collapse4">
<span class="h5 m-0 table-header header4"></span>
</a>
</span>
<span class="float-right my-0">
<a id="header4-complete" aria-label="number of items in table" class="btn btn-link" data-toggle="collapse" data-target="#collapse4">0</a>
</span>
</div>
<!-- FIFTH LOCATION TABLE -->
<div id="collapse4" class="collapse" data-parent="#accordion">
<div class="card-body p-0">
<div class="row text-center m-0">
<table id="table-4" class="table m-0"></table>
</div>
</div>
</div>
</div>
<!-- SIXTH LOCATION TABLE HEADER -->
<div class="card my-2">
<div class="card-header p-0">
<span class="float-left my-0">
<a class="btn btn-link" aria-label="table title" data-toggle="collapse" data-target="#collapse5">
<span class="h5 m-0 table-header header5"></span>
</a>
</span>
<span class="float-right my-0">
<a id="header5-complete" aria-label="number of items in table" class="btn btn-link" data-toggle="collapse" data-target="#collapse5">0</a>
</span>
</div>
<!-- SIXTH LOCATION TABLE -->
<div id="collapse5" class="collapse" data-parent="#accordion">
<div class="card-body p-0">
<div class="row text-center m-0">
<table id="table-5" class="table m-0"></table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- SHARING OPTIONS -->
<div id="import-export" class="row text-center mt-1">
<div class="col px-0 mr-3">
<a id="importCSV" role="button" aria-label="import shopping list" class="import-export-btn">
<span><i class="fas fa-upload"></i> Import</span>
</a>
<input type="file" id="uploadCSV" accept=".csv" name="filename" style="display: none;">
</div>
<div class="col px-0">
<a id="createCSV" href="#" aria-label="download shopping list" download="shoppr-export.csv" role="button" class="import-export-btn">
<span><i class="fas fa-download"></i> Download</span>
</a>
</div>
<div class="col px-0 ml-3">
<a id="emailCSV" aria-label="email shopping list" class="import-export-btn collapsed" role="button" data-toggle="collapse" data-target="#emailDropdown" aria-expanded="false">
<span><i class="fas fa-paper-plane"></i> Email</span>
</a>
</div>
</div>
<div class="row">
<div id="emailDropdown" class="col-12 collapse">
<form onsubmit="return false">
<input id="emailInput" aria-label="type your email address" type="email" class="text-center" required placeholder="Please type your email address">
<button id="sendEmail" aria-label="send email" type="submit" class="emailSubmit">Submit</button>
</form>
</div>
</div>
<!-- MOBILE ONLY ADD NEW ITEM BUTTON -->
<div class="row">
<div id="addNew" class="col-12 d-block d-md-none">
<div class="hero-btn">
<a aria-label="add new item" href="#menu-controls"><h4>Add new item</h4></a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- FOOTER -->
<footer id="fixed-footer">
<div class="container-fluid">
<div class="row">
<div id="footer-text" class="col-12 col-sm-10">
<i class="far fa-envelope mx-1"></i> <a href="mailto:[email protected]?subject=Support%20Query">Contact Shoppr Support</a>
</div>
<div id="ccLogo" class="col-12 col-sm-2 text-center">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0" height="35" src="assets/images/cc-byncsa.png" />
</a>
</div>
</div>
</div>
</footer>
<script src="assets/scripts.js"></script>
</body>
</html>