-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex-solution.html
533 lines (440 loc) · 29.8 KB
/
index-solution.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
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
<!DOCTYPE html>
<html lang="de">
<head>
<title>Holigio's Pizza</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="css/style.css" />
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍕</text></svg>">
</head>
<body class="page">
<header class="page__header header">
<a href="/" class="header__brand-name">
<img src="images/logo.svg" alt="Holigi's Pizza Logo" class="header__brand-logo" />
Holigi's Pizza
</a>
<nav>
<ul class="nav">
<li>
<a href="" class="nav__nav-item nav__nav-item--active">Pizza bestellen</a>
</li>
<li>
<a href="" class="nav__nav-item">Unsere Philosophie</a>
</li>
<li>
<a href="" class="nav__nav-item">Standorte</a>
</li>
</ul>
</nav>
</header>
<main class="page__main">
<h1 class="page__title">Pizza bestellen</h1>
<section class="page__section">
<h2 class="page__section-title">Unsere Empfehlungen</h2>
<p class="page__section-text">Wähle einen unserer Bestseller!</p>
<ul class="pizza-list">
<li class="pizza-list__item">
<article class="pizza">
<picture>
<source srcset="images/pizza/pizza-bianca-1440.webp 4x, images/pizza/pizza-bianca-720.webp 2x, images/pizza/pizza-bianca-360.webp 1x" type="image/webp" />
<source srcset="images/pizza/pizza-bianca-1440.jpg 4x, images/pizza/pizza-bianca-720.jpg 2x, images/pizza/pizza-bianca-360.jpg 1x" type="image/jpg" />
<img src="images/pizza/pizza-bianca-360.jpg" alt="Ein Foto von der Pizza Bianca" class="pizza__image" />
</picture>
<h3 class="pizza__name">Pizza Bianca</h3>
<p class="pizza__description">Ein Traum in Weiß – unschuldig und köstlich.</p>
<figure class="pizza__testimonial">
<blockquote class="pizza__testimonial-quote">
Diese Pizza ist so geil, dass sie direkt nach mir benannt wurde.
</blockquote>
<figcaption class="pizza__testimonial-caption">Christian Weiss</figcaption>
</figure>
<form method="post" action="" class="pizza__order-form" id="order-form-pizza-bianca">
<label for="input-pizza-quantity-bianca" class="pizza__form-label">Menge</label>
<input type="number" id="input-pizza-quantity-bianca" value="1" min="1" required class="pizza__quantity" />
<label for="output-pizza-price-bianca" class="pizza__form-label">Preis</label>
<output id="output-pizza-price-bianca" for="input-pizza-quantity-bianca" class="pizza__price" data-price="8.5">8,50 EUR</output>
</form>
<button form="order-form-pizza-bianca" class="pizza__add-to-order-button">Zur Bestellung hinzufügen</button>
</article>
</li>
<li class="pizza-list__item">
<article class="pizza">
<picture>
<source srcset="images/pizza/pizza-diavolo-1440.webp 4x, images/pizza/pizza-diavolo-720.webp 2x, images/pizza/pizza-diavolo-360.webp 1x" type="image/webp" />
<source srcset="images/pizza/pizza-diavolo-1440.jpg 4x, images/pizza/pizza-diavolo-720.jpg 2x, images/pizza/pizza-diavolo-360.jpg 1x" type="image/jpg" />
<img src="images/pizza/pizza-diavolo-360.jpg" alt="Ein Foto von der Pizza Diavolo" class="pizza__image" />
</picture>
<h3 class="pizza__name">Pizza Diavolo</h3>
<p class="pizza__description">Scharf wie eine geladene Waffe, pikant wie ein nicht jugendfreier Film.</p>
<figure class="pizza__testimonial">
<blockquote class="pizza__testimonial-quote">
Wenn du nicht diese Pizza bist, lautet die Antwort: Ja, ich kann ohne dich leben.
</blockquote>
<figcaption class="pizza__testimonial-caption">Bill Murray</figcaption>
</figure>
<form method="post" action="" class="pizza__order-form" id="order-form-pizza-diavolo">
<label for="input-pizza-quantity-diavolo" class="pizza__form-label">Menge</label>
<input type="number" id="input-pizza-quantity-diavolo" value="1" min="1" required class="pizza__quantity" />
<label for="output-pizza-price-diavolo" class="pizza__form-label">Preis</label>
<output id="output-pizza-price-diavolo" for="input-pizza-quantity-diavolo" class="pizza__price" data-price="8.5">8,50 EUR</output>
</form>
<button form="order-form-pizza-diavolo" class="pizza__add-to-order-button">Zur Bestellung hinzufügen</button>
</article>
</li>
<li class="pizza-list__item">
<article class="pizza">
<picture>
<source srcset="images/pizza/pizza-hawaii-1440.webp 4x, images/pizza/pizza-hawaii-720.webp 2x, images/pizza/pizza-hawaii-360.webp 1x" type="image/webp" />
<source srcset="images/pizza/pizza-hawaii-1440.jpg 4x, images/pizza/pizza-hawaii-720.jpg 2x, images/pizza/pizza-hawaii-360.jpg 1x" type="image/jpg" />
<img src="images/pizza/pizza-hawaii-360.jpg" alt="Ein Foto von der Pizza Hawaii" class="pizza__image" />
</picture>
<h3 class="pizza__name">Pizza Hawaii</h3>
<p class="pizza__description">Ananas auf Pizza: Auf welcher Seite stehst du?</p>
<figure class="pizza__testimonial">
<blockquote class="pizza__testimonial-quote">
Ich kannte die Seite meiner Freunde, nachdem ich diese göttliche Pizza verzehrt habe.
</blockquote>
<figcaption class="pizza__testimonial-caption">Timo Stübing</figcaption>
</figure>
<form method="post" action="" class="pizza__order-form" id="order-form-pizza-hawaii">
<label for="input-pizza-quantity-hawaii" class="pizza__form-label">Menge</label>
<input type="number" id="input-pizza-quantity-hawaii" value="1" min="1" required class="pizza__quantity" />
<label for="output-pizza-price-hawaii" class="pizza__form-label">Preis</label>
<output id="output-pizza-price-hawaii" for="input-pizza-quantity-hawaii" class="pizza__price" data-price="8.5">8,50 EUR</output>
</form>
<button form="order-form-pizza-hawaii" class="pizza__add-to-order-button">Zur Bestellung hinzufügen</button>
</article>
</li>
<li class="pizza-list__item">
<article class="pizza">
<picture>
<source srcset="images/pizza/pizza-anchovi-1440.webp 4x, images/pizza/pizza-anchovi-720.webp 2x, images/pizza/pizza-anchovi-360.webp 1x" type="image/webp" />
<source srcset="images/pizza/pizza-anchovi-1440.jpg 4x, images/pizza/pizza-anchovi-720.jpg 2x, images/pizza/pizza-anchovi-360.jpg 1x" type="image/jpg" />
<img src="images/pizza/pizza-anchovi-360.jpg" alt="Ein Foto von der Pizza Anchovi" class="pizza__image" />
</picture>
<h3 class="pizza__name">Pizza Anchovi</h3>
<p class="pizza__description">Fisch in Tomate in seiner schönsten Form.</p>
<figure class="pizza__testimonial">
<blockquote class="pizza__testimonial-quote">
We kept saying “one more can't hurt” and then they were gone. We're sorry!
</blockquote>
<figcaption class="pizza__testimonial-caption">Dr. Zoidberg</figcaption>
</figure>
<form method="post" action="" class="pizza__order-form" id="order-form-pizza-anchovi">
<label for="input-pizza-quantity-anchovi" class="pizza__form-label">Menge</label>
<input type="number" id="input-pizza-quantity-anchovi" value="1" min="1" required class="pizza__quantity" />
<label for="output-pizza-price-anchovi" class="pizza__form-label">Preis</label>
<output id="output-pizza-price-anchovi" for="input-pizza-quantity-anchovi" class="pizza__price" data-price="8.5">8,50 EUR</output>
</form>
<button form="order-form-pizza-anchovi" class="pizza__add-to-order-button">Zur Bestellung hinzufügen</button>
</article>
</li>
<li class="pizza-list__item">
<article class="pizza">
<picture>
<source srcset="images/pizza/pizza-salami-1440.webp 4x, images/pizza/pizza-salami-720.webp 2x, images/pizza/pizza-salami-360.webp 1x" type="image/webp" />
<source srcset="images/pizza/pizza-salami-1440.jpg 4x, images/pizza/pizza-salami-720.jpg 2x, images/pizza/pizza-salami-360.jpg 1x" type="image/jpg" />
<img src="images/pizza/pizza-salami-360.jpg" alt="Ein Foto von der Pizza Salami" class="pizza__image" />
</picture>
<h3 class="pizza__name">Pizza Salami</h3>
<p class="pizza__description">Tomate, Salami, Käse. Absolut keine Überraschungen hier.</p>
<figure class="pizza__testimonial">
<blockquote class="pizza__testimonial-quote">
Zucchini schmeckt übrigens am besten, wenn man sie wegwirft und diese Pizza bestellt.
</blockquote>
<figcaption class="pizza__testimonial-caption">Jonas Engler</figcaption>
</figure>
<form method="post" action="" class="pizza__order-form" id="order-form-pizza-salami">
<label for="input-pizza-quantity-salami" class="pizza__form-label">Menge</label>
<input type="number" id="input-pizza-quantity-salami" value="1" min="1" required class="pizza__quantity" />
<label for="output-pizza-price-salami" class="pizza__form-label">Preis</label>
<output id="output-pizza-price-salami" for="input-pizza-quantity-salami" class="pizza__price" data-price="8.5">8,50 EUR</output>
</form>
<button form="order-form-pizza-salami" class="pizza__add-to-order-button">Zur Bestellung hinzufügen</button>
</article>
</li>
<li class="pizza-list__item">
<article class="pizza">
<picture>
<source srcset="images/pizza/pizza-funghi-speziale-1440.webp 4x, images/pizza/pizza-funghi-speziale-720.webp 2x, images/pizza/pizza-funghi-speziale-360.webp 1x" type="image/webp" />
<source srcset="images/pizza/pizza-funghi-speziale-1440.jpg 4x, images/pizza/pizza-funghi-speziale-720.jpg 2x, images/pizza/pizza-funghi-speziale-360.jpg 1x" type="image/jpg" />
<img src="images/pizza/pizza-funghi-speziale-360.jpg" alt="Ein Foto von der Pizza Funghi Speziale" class="pizza__image" />
</picture>
<h3 class="pizza__name">Pizza Funghi Speziale</h3>
<p class="pizza__description">Für experimentierfreudige Feinschmecker.</p>
<figure class="pizza__testimonial">
<blockquote class="pizza__testimonial-quote">
Der perfekte Begleiter zum Fußpils.
</blockquote>
<figcaption class="pizza__testimonial-caption">Marvin Luchs</figcaption>
</figure>
<form method="post" action="" class="pizza__order-form" id="order-form-pizza-funghi-speziale">
<label for="input-pizza-quantity-funghi-speziale" class="pizza__form-label">Menge</label>
<input type="number" id="input-pizza-quantity-funghi-speziale" value="1" min="1" required class="pizza__quantity" />
<label for="output-pizza-price-funghi-speziale" class="pizza__form-label">Preis</label>
<output id="output-pizza-price-funghi-speziale" for="input-pizza-quantity-funghi-speziale" class=data-"pizza__price">8,50 EUR</output>
</form>
<button form="order-form-pizza-funghi-speziale" class="pizza__add-to-order-button">Zur Bestellung hinzufügen</button>
</article>
</li>
<li class="pizza-list__item">
<article class="pizza">
<picture>
<source srcset="images/pizza/pizza-pomodoro-1440.webp 4x, images/pizza/pizza-pomodoro-720.webp 2x, images/pizza/pizza-pomodoro-360.webp 1x" type="image/webp" />
<source srcset="images/pizza/pizza-pomodoro-1440.jpg 4x, images/pizza/pizza-pomodoro-720.jpg 2x, images/pizza/pizza-pomodoro-360.jpg 1x" type="image/jpg" />
<img src="images/pizza/pizza-pomodoro-360.jpg" alt="Ein Foto von der Pizza Pomodoro" class="pizza__image" />
</picture>
<h3 class="pizza__name">Pizza Pomodoro</h3>
<p class="pizza__description">Damit die Vegetarier auch mitmachen dürfen.</p>
<figure class="pizza__testimonial">
<blockquote class="pizza__testimonial-quote">
Nur Fleisch macht Fleisch!
</blockquote>
<figcaption class="pizza__testimonial-caption">Markus Rühl</figcaption>
</figure>
<form method="post" action="" class="pizza__order-form" id="order-form-pizza-pomodoro">
<label for="input-pizza-quantity-pomodoro" class="pizza__form-label">Menge</label>
<input type="number" id="input-pizza-quantity-pomodoro" value="1" min="1" required class="pizza__quantity" />
<label for="output-pizza-price-pomodoro" class="pizza__form-label">Preis</label>
<output id="output-pizza-price-pomodoro" for="input-pizza-quantity-pomodoro" class="pizza__price" data-price="8.5">8,50 EUR</output>
</form>
<button form="order-form-pizza-pomodoro" class="button button--primary pizza__add-to-order-button">Zur Bestellung hinzufügen</button>
</article>
</li>
</ul>
</section>
<section class="page__section">
<h2 class="page__section-title">Pizza-Baukasten</h2>
<p class="page__section-text">In drei Schritten zur Wunschpizza!</p>
<form method="post" action="" id="form-pizza-builder" class="pizza-builder">
<ol class="pizza-builder__steps">
<li class="pizza-builder__step">
<label class="pizza-builder__label">Größe</label>
<input type="range" name="size" id="input-pizza-builder-size" list="sizes" min="26" max="38" step="6" value="32" class="pizza-builder__size-range" />
<datalist id="sizes">
<option value="26" label="Klein (26cm)"></option>
<option value="32" label="Standard (32cm)"></option>
<option value="38" label="Groß (38cm)"></option>
</datalist>
<output for="input-pizza-builder-size" id="output-pizza-builder-size" class="pizza-builder__size">Standard (32cm)</output>
</li>
<li class="pizza-builder__step">
<fieldset class="pizza-builder__fieldset">
<legend class="pizza-builder__label">Sauce</legend>
<label class="form-choice__label">
<input type="radio" name="sauce" value="tomatensauce" checked class="form-choice__control" />
Tomatensauce
</label>
<label class="form-choice__label">
<input type="radio" name="sauce" value="curry-sauce" class="form-choice__control" />
Curry-Sauce
</label>
<label class="form-choice__label">
<input type="radio" name="sauce" value="barbecue-sauce" class="form-choice__control" />
Barbecue-Sauce
</label>
<label class="form-choice__label">
<input type="radio" name="sauce" value="no-sauce" class="form-choice__control" />
Ohne Sauce
</label>
</fieldset>
</li>
<li class="pizza-builder__step">
<fieldset class="pizza-builder__fieldset">
<legend class="pizza-builder__label">Belag</legend>
<label class="form-choice__label">
<input type="checkbox" name="toppings" value="champignons" class="form-choice__control" />
Champignons
</label>
<label class="form-choice__label">
<input type="checkbox" name="toppings" value="salami" class="form-choice__control" />
Salami
</label>
<label class="form-choice__label">
<input type="checkbox" name="toppings" value="schinken" class="form-choice__control" />
Schinken
</label>
<label class="form-choice__label">
<input type="checkbox" name="toppings" value="kirschtomaten" class="form-choice__control" />
Kirschtomaten
</label>
<label class="form-choice__label">
<input type="checkbox" name="toppings" value="oliven" class="form-choice__control" />
Oliven
</label>
<label class="form-choice__label">
<input type="checkbox" name="toppings" value="ananas" class="form-choice__control" />
Ananas
</label>
<button type="button" id="button-pizza-builder-select-all" class="button button--secondary button--small pizza-builder__select-all-button">Alle auswählen</button>
</fieldset>
</li>
<li class="pizza-builder__step">
<p><strong>Fertig!</strong></p>
<p class="pizza-builder__actions">
<button class="button button--primary pizza-builder__add-to-order-button">Zur Bestellung hinzufügen</button>
oder
<button type="reset" class="button button--secondary button--small pizza-builder__reset-button">Von vorne anfangen</button>
</p>
</li>
</ol>
</form>
</section>
<section class="page__section">
<h2 class="page__section-title">Deine Bestellung</h2>
<p class="page__section-text">Schnell die Lieferadresse eingeben und schon ist dein Essen unterwegs!</p>
<table class="order-list">
<thead>
<tr>
<th class="order-list__column-header">Pizza</th>
<th class="order-list__column-header order-list__quantity-header">Anzahl</th>
<th class="order-list__column-header order-list__price-header">Preis</th>
<th class="order-list__column-header visually-hidden">Aktionen</th>
</tr>
</thead>
<tbody>
<tr>
<td class="order-list__cell">Pizza Salami</td>
<td class="order-list__cell order-list__quantity">2</td>
<td class="order-list__cell order-list__price">17,00 EUR</td>
<td class="order-list__cell">
<form method="post" action="">
<button name="remove-item" value="pizza-1" class="button button--small button--danger">Entfernen</button>
</form>
</td>
</tr>
<tr>
<td class="order-list__cell">Pizza Bianca</td>
<td class="order-list__cell order-list__quantity">1</td>
<td class="order-list__cell order-list__price">8,50 EUR</td>
<td class="order-list__cell">
<form method="post" action="">
<button name="remove-item" value="pizza-2" class="button button--small button--danger">Entfernen</button>
</form>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="2" class="order-list__footer-label">Summe</th>
<td class="order-list__footer-sum">25,50 EUR</td>
<td></td>
</tr>
</tfoot>
</table>
<form method="post" action="" class="form order-form">
<input type="hidden" name="orderId" value="order-1" />
<label class="form__label">
Gewünschter Lieferzeitpunkt
<input type="time" name="preferredDeliveryTime" min="11:00" max="23:00" value="17:00" class="order-form__preferred-delivery-time" />
</label>
<fieldset class="form__fieldset">
<legend>Lieferanschrift</legend>
<label for="input-order-form-form-of-address" class="form__label form__label--fielset">Anrede
<select id="input-order-form-form-of-address" name="formOfAddress" class="order-form__form-of-address">
<option value="x">keine</option>
<option value="f">Frau</option>
<option value="m">Herr</option>
</select>
</label>
<label for="input-order-form-first-name" class="form__label form__label--fielset">Vorname
<input type="text" id="input-order-form-first-name" name="firstName" required autocomplete="given-name" />
</label>
<label for="input-order-form-last-name" class="form__label form__label--fielset">Nachname
<input type="text" id="input-order-form-last-name" name="lastName" required autocomplete="family-name" />
</label>
<div class="order-form__street-house-no">
<label for="input-order-form-street" class="form__label form__label--fielset">Straße
<input type="text" id="input-order-form-street" name="street" required />
</label>
<label for="input-order-form-house-no" class="form__label form__label--fielset">Hausnummer
<input type="text" id="input-order-form-house-no" name="houseNo" required pattern="\d+[a-zA-Z]?" />
</label>
</div>
<div class="order-form__zip-code-city">
<label for="input-order-form-zip-code" class="form__label form__label--fielset"><abbr title="Postleitzahl">PLZ</abbr>
<input type="text" id="input-order-form-zip-code" name="zipCode" inputmode="numeric" required pattern="\d{5}" />
</label>
<label for="input-order-form-city" class="form__label form__label--fielset">Ort
<input type="text" id="input-order-form-city" name="city" list="cities" required />
<datalist id="cities">
<option value="Hamburg"></option>
<option value="Hannover"></option>
<option value="Kiel"></option>
</datalist>
</label>
</div>
</fieldset>
<fieldset class="form__fieldset">
<legend>Kontaktdaten</legend>
<label for="input-order-form-phone" class="form__label form__label--fielset">Telefon
<input type="tel" name="phone" required autocomplete="tel" />
</label>
<label for="input-order-form-email" class="form__label form__label--fielset">E-Mail
<input type="email" name="email" required autocomplete="email" />
</label>
</fieldset>
<label for="input-order-form-note" class="form__label">
Anmerkungen
<textarea name="note" id="input-order-form-note"></textarea>
</label>
<button class="button button--primary order-form__order-button">Kostenpflichtig bestellen</button>
</form>
</section>
</main>
<footer class="page__footer footer">
<address class="footer__address">
<p>
<strong class="footer__company">Holigio's Pizza</strong><br />
Jürgen-Töpfer-Straße 44<br />
22763 Hamburg
</p>
<p class="footer__contact">
E-Mail: <a href="mailto:[email protected]" class="footer__link">[email protected]</a><br />
Telefon: <a href="tel:+494060944300" class="footer__link">+49 40 6094 430-0</a>
</p>
</address>
<ul class="footer__links">
<li>
<a href="https://www.holisticon.de/impressum/" class="footer__link">Impressum</a>
</li>
<li>
<a href="https://www.holisticon.de/de/impressum/#datenschutz" class="footer__link">Datenschutz</a>
</li>
</ul>
</footer>
<script>
const eurPrice = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR', currencyDisplay: 'code' });
[...document.querySelectorAll('.pizza__quantity')].forEach(quantityInput => {
quantityInput.addEventListener('keyup', () => {
const priceOutput = document.querySelector(`output[for="${quantityInput.id}"]`);
const quantity = parseInt(quantityInput.value);
if (isNaN(quantity)) {
priceOutput.textContent = parseFloat(priceOutput.dataset['price']);
}
priceOutput.textContent = eurPrice.format(parseFloat(priceOutput.dataset['price']) * quantityInput.value);
});
});
const updatePizzaSizeOutput = () => {
const sizeInput = document.querySelector('#input-pizza-builder-size');
const selectedOption = [...sizeInput.list.options].find(({ value }) => value === sizeInput.value);
if (selectedOption !== undefined) {
document.querySelector('#output-pizza-builder-size').textContent = selectedOption.label;
};
}
document.querySelector('#input-pizza-builder-size')
.addEventListener('change', () => updatePizzaSizeOutput());
document.querySelector('#form-pizza-builder')
.addEventListener('reset', () => {
setTimeout(() => updatePizzaSizeOutput());
});
document.querySelector('#button-pizza-builder-select-all')
.addEventListener('click', () => {
[...document.querySelectorAll('input[type="checkbox"][name="toppings"]')].forEach(
checkbox => checkbox.checked = true
);
});
</script>
</body>
</html>