-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist.html
272 lines (256 loc) · 8.26 KB
/
list.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Pantry Pal</title>
<link rel="icon" href="./assets/icon-192.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="manifest" href="./manifest.json" />
<link
href="https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet"
/>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('./service-worker.js');
});
}
</script>
</head>
<body>
<nav>
<div class="navContents">
<p>Pantry Pal</p>
<button id="openOptionsModalButton">Settings</button>
</div>
</nav>
<div class="container">
<div class="returnLinkContainer">
<a class="returnLink" href="index.html">← Return to lists</a>
</div>
<!-- ADD LIST/ITEM MODAL TRIGGERS -->
<div class="openModalButtonContainer">
<button
class="openModalButton"
id="openModalButton"
aria-haspopup="dialog"
aria-controls="modal"
>
<div class="plus"></div>
<p>Add Item</p>
</button>
</div>
<!-- MASS ACTIONS -->
<div class="itemMassActions">
<div class="selectAllInputContainer">
<label>
<input
type="checkbox"
onChange="toggleAllItemsPurchaseStatus(event)"
/>
Mark All Items Retrieved
</label>
</div>
<div class="itemMassActionsButtons">
<button class="cancelButton" id="openConfirmDeleteModal">
Delete All
</button>
<!-- <button class="altButton">Move to List</button> -->
</div>
</div>
<!-- MODAL STRUCTURE -->
<!-- ADD ITEM MODAL -->
<div
id="modal"
class="modal"
role="dialog"
aria-labelledby="modalTitle"
aria-modal="true"
aria-hidden="true"
>
<div class="modal-content">
<button id="closeModal" class="close" aria-label="Close">
×
</button>
<h2 id="modalTitle">Add New Item</h2>
<form id="addItemForm" novalidate>
<label for="nameInput">
Item
<input
type="text"
id="nameInput"
placeholder="Grocery Item"
aria-describedby="nameError"
required
/>
<span class="error" id="nameError"></span>
</label>
<div class="formInputGroup">
<label for="quantityInput">
Quantity
<input type="number" id="quantityInput" value="1" />
</label>
<label for="quantityUnitInput">
Unit
<select name="quantityUnitInput" id="quantityUnitInput">
<!-- GENERATED IN FORM.JS AND OPTIONSDATA.JS -->
</select>
</label>
</div>
<!-- <label for="priceInput">
Price
<input
id="priceInput"
type="number"
placeholder="1.99"
step="0.01"
min="0"
aria-describedby="priceError"
/>
<span class="error" id="priceError"></span>
</label> -->
<label for="sectionInput">
Store Section
<select name="sectionInput" id="sectionInput">
<!-- GENERATED IN FORM.TS AND OPTIONSDATA.JS -->
</select>
</label>
<div class="formActionsDiv">
<button type="submit" class="addButton" id="addItemButton">
Add Item
</button>
<button id="cancelButton" class="cancelButton">Cancel</button>
</div>
</form>
</div>
</div>
</div>
<!-- TODO: DELETE CONFIRMATION MODAL -->
<div
id="confirmDeleteModal"
class="modal"
role="dialog"
aria-labelledby="confirmDeleteModalTitle"
aria-modal="true"
aria-hidden="true"
>
<div class="modal-content">
<div>
<button id="closeConfirmDeleteModal" class="close" aria-label="Close">
×
</button>
<h2 id="confirmDeleteModalTitle">Confirm Item Deletion</h2>
<div class="confirmDeleteContent">
<h3>Are you sure?</h3>
<p>
This action will remove all items that are marked as purchased and
cannot be undone
</p>
<div class="confirmDeleteActions">
<button id="confirmDeleteAllButton" class="addButton">
Confirm
</button>
<button id="cancelDeleteAllButton" class="cancelButton">
Cancel
</button>
</div>
</div>
</div>
</div>
</div>
<!-- FILTERS AND OPTIONS SIDEBAR -->
<div
id="optionsModal"
class="optionsModal"
role="dialog"
aria-labelledby="optionsModalTitle"
aria-modal="true"
aria-hidden="true"
>
<div class="optionsSettingsContainer">
<div class="optionsModalTitleContainer">
<h2 class="optionsModalTitle">Settings</h2>
<button
id="closeOptionsModal"
class="close"
aria-label="Close Settings Panel"
>
×
</button>
</div>
<div class="filterInputs">
<div class="filterControl">
<p id="autoSortLabel" class="controlText">Auto Sort</p>
<label class="switch">
<input
name="autoSort"
aria-labelledby="autoSortLabel"
id="autoSort"
type="checkbox"
class="switch-input"
/>
<span class="switch-label" data-on="On" data-off="Off"></span>
<span class="switch-handle"></span>
</label>
</div>
<div class="filterControl">
<p id="hideCheckedLabel" class="controlText">Hide Checked</p>
<label class="switch">
<input
id="hideChecked"
aria-labelledby="hideCheckedLabel"
type="checkbox"
class="switch-input"
/>
<span class="switch-label" data-on="On" data-off="Off"></span>
<span class="switch-handle"></span>
</label>
</div>
<div class="filterControl">
<p id="sectionSortLabel" class="controlText">Sort by Section</p>
<label class="switch">
<input
id="sectionSort"
aria-labelledby="sectionSortLabel"
type="checkbox"
class="switch-input"
/>
<span class="switch-label" data-on="On" data-off="Off"></span>
<span class="switch-handle"></span>
</label>
</div>
</div>
<div class="optionsModalFooter">
<button id="backupData" class="altButton">Download</button>
<div class="uploadBackupArea">
<form id="uploadBackupForm">
<label class="fileInputLabel" for="backupFileInput">
<input
type="file"
id="backupFileInput"
accept="application/json"
/>
</label>
<button class="uploadBackupButton" type="submit">Upload</button>
<!-- <div id="spinner">Loading...</div> -->
</form>
</div>
</div>
</div>
</div>
<!-- SHOPPING ITEMS LIST -->
<ul id="itemsDiv"></ul>
<!-- SECTION SORTING -->
<div class="stickyQuickSortFooter" id="stickyQuickSortFooter">
<div id="quickSortWrapper">
<div id="quickSortDiv">
<!-- CONTENT RENDERED IN DOMUTILS.TS -->
</div>
</div>
</div>
<script src="./list.js"></script>
</body>
</html>