-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchecklist.html
More file actions
435 lines (381 loc) · 14.7 KB
/
checklist.html
File metadata and controls
435 lines (381 loc) · 14.7 KB
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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script defer src="registerscript.js"></script>
<script defer src="itemhandlerservice.js"></script>
<style>
body {
margin: 0; /* Removes default margin around the page */
height: 100vh; /* Makes the body take up the full height of the viewport */
background-color: #1E1E2E; /* Dark background color */
color: #E0E0E0; /* Light gray text color */
display: flex; /* Enables Flexbox layout */
flex-direction: column; /* Aligns children vertically */
overflow: auto; /* Allows scrolling if content overflows */
display: block; /* Prevents body from being restricted to 100vh */
padding-bottom: 100px; /* Adds space for the navbar at the bottom */
padding-top: 0px; /* Removes any space at the top */
}
* {
padding: 0; /* Removes padding from all elements */
margin: 0; /* Removes margin from all elements */
box-sizing: border-box; /* Ensures padding and border are included in element's total width/height */
}
.logo {
background-color: #1E1E2E; /* Same color as the body background */
color: #E0E0E0; /* Light gray color for the text */
text-align: center; /* Centers the text horizontally */
padding: 20px 0; /* Adds vertical padding */
font-size: 36px; /* Sets large font size for the logo */
font-weight: bold; /* Makes the logo text bold */
letter-spacing: 2px; /* Adds space between the letters */
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2); /* Adds shadow to make the logo pop */
z-index: 1000; /* Ensures the logo stays on top */
}
.logo span {
color: #50FA7B; /* Changes the color of the "Sort" part of the logo */
}
.bottom-right-item-add-button {
position: fixed; /* Fixes the button at a specific position on the screen */
bottom: 100px; /* Positions the button 100px from the bottom */
right: 10px; /* Positions the button 10px from the right */
}
.imagesize-item-add-button {
height: 75px; /* Sets the button height */
}
.rounded {
border-radius: 10px; /* Rounds the corners of elements */
}
.smallimage {
height: 100px; /* Sets height for small images */
}
.imagesize-icons-taskbar {
height: 50px; /* Sets height for taskbar icons */
}
.modal-content input, .modal-content select, .modal-content button {
margin: 10px 0; /* Adds margin around input fields */
padding: 10px; /* Adds padding inside input fields */
font-size: 16px; /* Sets font size for inputs and buttons */
}
.nav {
width: 100%; /* Makes the navbar span the full width */
text-align: center; /* Centers navbar items */
background: #1E1E2E; /* Matches the page background color */
position: fixed; /* Fixes the navbar to the bottom of the screen */
left: 0; /* Positions the navbar at the left */
bottom: 0; /* Positions the navbar at the bottom */
box-shadow: 0px -5px 5px -2px rgba(0, 0, 0, 0.2); /* Adds shadow for effect */
z-index: 1000; /* Ensures navbar stays on top */
height: 55px; /* Sets navbar height */
}
.nav ul {
list-style-type: none; /* Removes bullets from list items */
padding: 0; /* Removes padding */
margin: 0; /* Removes margin */
display: flex; /* Enables Flexbox layout */
justify-content: space-evenly; /* Distributes navbar items evenly */
width: 100%; /* Makes the navbar span the full width */
height: 100%; /* Ensures icons fill the navbar */
}
.nav ul li {
display: inline-block; /* Displays list items inline */
}
.nav ul li .nav-link {
text-decoration: none; /* Removes underline from links */
color: #ccc; /* Sets link color */
padding: 15px; /* Adds padding around the links */
display: block; /* Makes links block elements */
}
.content-centered{
text-align: center;
}
.modal {
display: none;
position: fixed;
z-index: 1001;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
}
.modal-content {
background-color: #282a36;
padding: 20px;
border-radius: 8px;
width: 300px;
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
}
.modal-content label, .modal-content input, .modal-content textarea {
display: block;
width: 100%;
margin-bottom: 10px;
}
.modal-content input, .modal-content textarea {
padding: 8px;
border: none;
border-radius: 5px;
}
.modal-content button {
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
.button-green {
background-color: #50FA7B;
}
.button-green:hover {
background-color: #45e06e;
}
.button-red {
background-color: #FF5555;
}
.button-red:hover {
background-color: #e04b4b;
}
.button-yellow {
background-color: #be800b;
}
.button-yellow:hover {
background-color: #be800b;
}
.error-message {
color: #FF5555;
font-size: 15px;
text-align: left;
margin-bottom: 10px;
display: none;
}
.no-items-display-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
}
.no-items-display-image {
max-width: 90%;
max-height: 50vh;
object-fit: contain;
display: none;
}
.no-items-display-text {
margin-top: 10px;
font-size: 1.2rem;
}
.food-list {
margin: 20px;
padding: 10px;
padding-bottom: 60px;
overflow-y: auto; /* activate scrolling when there are to many items */
}
.food-item {
background: linear-gradient(145deg, #323247, #292A3A);
padding: 20px;
border-radius: 15px;
margin-bottom: 15px;
box-shadow: 0 8px 15px rgba(80, 250, 123, 0.3);
color: #E0E0E0;
transition: transform 0.2s ease, box-shadow 0.3s ease;
cursor: pointer;
border: 1.5px solid transparent;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 15px;
}
.food-item:hover {
transform: translateY(-5px);
box-shadow: 0 12px 20px rgba(80, 250, 123, 0.5);
border: 1.5px solid #50FA7B;
}
/* Linker Bereich mit Name und Beschreibung */
.food-item .left-section {
flex: 1 1 60%;
min-width: 200px;
}
.food-item h3 {
font-weight: 700;
font-size: 1.5rem;
letter-spacing: 1.2px;
color: #50FA7B;
margin-bottom: 8px;
}
.food-item p {
font-size: 1rem;
line-height: 1.3;
color: #C0C0C0;
font-style: italic;
}
/* Rechter Bereich mit Daten */
.food-item .right-section {
flex: 1 1 35%;
min-width: 150px;
display: flex;
flex-direction: column;
justify-content: center;
gap: 6px;
font-size: 0.9rem;
color: #A0A0A0;
}
/* Daten-Labels fett */
.food-item .right-section div strong {
color: #50FA7B;
}
/* Responsive: Auf kleinen Bildschirmen alles untereinander */
@media (max-width: 600px) {
.food-item {
flex-direction: column;
}
.food-item .left-section, .food-item .right-section {
flex: 1 1 100%;
min-width: unset;
}
}
.inventory-header {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin: 20px 20px 10px 20px;
}
.inventory-header h1 {
color: #50FA7B;
font-weight: 600;
font-size: 3.2rem;
white-space: nowrap;
}
.inventory-header .line {
flex-grow: 1;
border: none;
border-bottom: 1.5px solid #50FA7B;
opacity: 0.3;
}
.toggle-container {
display: flex;
align-items: center;
margin-top: 10px;
color: #E0E0E0;
gap: 10px;
}
.toggle-switch {
position: relative;
display: flex;
width: 50px;
height: 24px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
top: 0;
bottom: 0;
background-color: #646161;
transition: 0.4s;
border-radius: 24px;
width: 50px; /* ← NEU */
}
.slider:before {
position: absolute;
content: "";
height: 20px; /* Slightly smaller than the slider height */
width: 20px; /* Same as height for a perfect circle */
left: 2px; /* Small padding from the left for the initial position */
top: 2px; /* Small padding from the top */
background-color: white;
transition: 0.4s;
border-radius: 50%;
}
.toggle-switch input:checked + .slider {
background-color: #50FA7B;
}
.toggle-switch input:checked + .slider:before {
transform: translateX(26px); /* Adjusted to slide all the way to the end */
}
</style>
</head>
<body>
<div class="logo">
<h1><span>Fridge</span>Sort</h1> <!-- Logo text -->
</div>
<div class="inventory-header">
<hr class="line"/>
<h1>Aktueller Bestand</h1>
<hr class="line"/>
</div>
<div id="addItemModal" class="modal">
<div class="modal-content">
<h2>Neues Lebensmittel</h2>
<label for="itemName">Lebensmittel:</label>
<input type="text" id="itemName" placeholder="Name eingeben">
<label for="currentDate">Aktuelles Datum:</label>
<input type="date" id="currentDate" readonly>
<label for="expiryDate">Ablaufdatum:</label>
<input type="date" id="expiryDate">
<label for="description">Beschreibung:</label>
<textarea id="description" placeholder="Beschreibung hinzufügen"></textarea>
<span>Automatisch zur Einkaufsliste nach Verbrauch</span>
<div class="toggle-container">
<label class="toggle-switch">
<input type="checkbox" id="addAutoShop">
<span class="slider"></span>
</label>
</div>
<p id="errorMessage" class="error-message">Bitte alle erforderlichen Felder ausfüllen!</p>
<button onclick="saveItem()" class="button-green">Speichern</button>
<button onclick="closeAddItemModal()" class="button-green">Abbrechen</button>
</div>
</div>
<div id="editItemModal" class="modal">
<div class="modal-content">
<h2>Lebensmittel bearbeiten</h2>
<label for="editItemName">Lebensmittel:</label>
<input type="text" id="editItemName" placeholder="Name eingeben">
<label for="editCurrentDate">Datum des Eintrages:</label>
<input type="date" id="editCurrentDate" readonly>
<label for="editExpiryDate">Ablaufdatum:</label>
<input type="date" id="editExpiryDate">
<label for="editDescription">Beschreibung:</label>
<textarea id="editDescription" placeholder="Beschreibung hinzufügen"></textarea>
<span>Automatisch zur Einkaufsliste nach Verbrauch</span>
<div class="toggle-container">
<label class="toggle-switch">
<input type="checkbox" id="editAddAutoShop">
<span class="slider"></span>
</label>
</div>
<p id="editErrorMessage" class="error-message">Bitte alle erforderlichen Felder ausfüllen!</p>
<button onclick="saveEditedItem()" class="button-green">Speichern</button>
<button onclick="useItem()" class="button-green">Verbrauchen</button>
<button onclick="throwItem()" class="button-yellow">Wegwerfen</button>
<button onclick="deleteItem()" class="button-red">Löschen</button>
<button onclick="closeEditItemModal()" class="button-green">Abbrechen</button>
</div>
</div>
<div class="food-list" id="foodList"></div>
<div class="nav">
<ul>
<li><a href="https://www.google.com/maps/search/Geöffnete+Supermärkte+in+meiner+Nähe"><img
src="img/taskbar/map.png" class="rounded imagesize-icons-taskbar"></a></li>
<li><a href="recepies.html"><img src="img/taskbar/book.png" class="rounded imagesize-icons-taskbar"></a></li>
<li><a href="checklist.html"><img src="img/taskbar/checklist.png" class="rounded imagesize-icons-taskbar"></a>
</li>
<li><a href="shop.html"><img src="img/taskbar/shop.png" class="rounded imagesize-icons-taskbar"></a>
</li>
<li><a href="profile.html"><img src="img/taskbar/profile.png" class="rounded imagesize-icons-taskbar"></a></li>
</ul>
</div>
<img src="img/misc/add_button.png" class="imagesize-item-add-button bottom-right-item-add-button"
onclick="openAddItemModal()">
</body>
</html>