From 7c558ef061e7e746be2b18020e2b05bc2438cc11 Mon Sep 17 00:00:00 2001 From: kitkatpotato16 <523488@vistacollege.nl> Date: Thu, 13 Feb 2025 12:06:34 +0100 Subject: [PATCH 1/9] iytu --- website/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/script.js b/website/script.js index fc6c485..3b3ae44 100644 --- a/website/script.js +++ b/website/script.js @@ -47,8 +47,8 @@ function showCategory(category) { items = [ { title: "Ijsjes", imageSrc: "media/Ijs.png", price: 1.50 }, { title: "Sorbet", imageSrc: "media/sorbet.webp", price: 2.50 }, - { title: "Softijs", imageSrc: "https://www.yourlittleblackbook.me/wp-content/uploads/2023/07/lekkerste-softijs-amsterdam.jpg", price: 2.50 }, - { title: "Sundea ijs", imageSrc: "https://easyfoodheesch.nl/wp-content/uploads/2021/02/IMG_7402.jpg", price: 2.50 }, + { title: "Softijs", imageSrc: "https://www.yourlittleblackbook.me/wp-content/uploads/2023/07/lekkerste-softijs-amsterdam.jpg", price: 2.00 }, + { title: "Sundea ijs", imageSrc: "https://easyfoodheesch.nl/wp-content/uploads/2021/02/IMG_7402.jpg", price: 1.50 }, ]; } else if (category === 'Deals') { items = [ From 1f214aab9ea190d4029f1c6a0fc1d929f7d66dcc Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Thu, 13 Feb 2025 12:08:51 +0100 Subject: [PATCH 2/9] s --- website/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/script.js b/website/script.js index fc6c485..d2d34c7 100644 --- a/website/script.js +++ b/website/script.js @@ -47,8 +47,8 @@ function showCategory(category) { items = [ { title: "Ijsjes", imageSrc: "media/Ijs.png", price: 1.50 }, { title: "Sorbet", imageSrc: "media/sorbet.webp", price: 2.50 }, - { title: "Softijs", imageSrc: "https://www.yourlittleblackbook.me/wp-content/uploads/2023/07/lekkerste-softijs-amsterdam.jpg", price: 2.50 }, - { title: "Sundea ijs", imageSrc: "https://easyfoodheesch.nl/wp-content/uploads/2021/02/IMG_7402.jpg", price: 2.50 }, + { title: "Softijs", imageSrc: "media/softijs.jpg", price: 2.50 }, + { title: "Sundea ijs", imageSrc: "media/sundea.jpg", price: 2.50 }, ]; } else if (category === 'Deals') { items = [ From 85a10d7cd9e56b8df81711164bcafe76435ae479 Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Thu, 13 Feb 2025 12:10:31 +0100 Subject: [PATCH 3/9] center --- website/welcome.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/welcome.html b/website/welcome.html index 5af8d6d..7c87691 100644 --- a/website/welcome.html +++ b/website/welcome.html @@ -21,7 +21,9 @@ From 462cd5f20637473b007ed310e395bb36c32ff44b Mon Sep 17 00:00:00 2001 From: Dylanomz <527457@vistacollege.nl> Date: Thu, 13 Feb 2025 12:20:21 +0100 Subject: [PATCH 4/9] k --- website/cart.js | 19 ++++++++++++++++ website/index.html | 29 ++++++++++++++++++++++++ website/script.js | 4 ---- website/style.css | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 4 deletions(-) diff --git a/website/cart.js b/website/cart.js index d90e190..f936961 100644 --- a/website/cart.js +++ b/website/cart.js @@ -1,6 +1,10 @@ + + // Array to hold items added to the shopping cart const cart = []; + + // Functie om een item aan het winkelwagentje toe te voegen function addToCart(item) { cart.unshift(item); // Add item to the beginning of the cart array @@ -8,6 +12,8 @@ function addToCart(item) { closeModal(); } + + // Functie om het winkelwagentje bij te werken function updateCart() { const cartItemsContainer = document.getElementById("cart-items"); @@ -35,6 +41,7 @@ function updateCart() { } } + // Functie om een item uit het winkelwagentje te verwijderen function removeFromCart(index) { cart.splice(index, 1); @@ -43,3 +50,15 @@ function removeFromCart(index) { // Initial call to updateCart to ensure the button is hidden on page load updateCart(); + +// Functie om het modaal venster te sluiten +function closeModal() { + document.getElementById('modal').style.display = 'none'; +} + +let cartCount = 0; + +function addToCart() { + cartCount++; + document.querySelector('.cart-count').textContent = cartCount; +} diff --git a/website/index.html b/website/index.html index 4b9392e..5c2d5ab 100644 --- a/website/index.html +++ b/website/index.html @@ -61,3 +61,32 @@ + + + +
+ + 0 +
+ + +
+
+

Product 1

+

Prijs: €10

+ +
+
+

Product 2

+

Prijs: €15

+ +
+
+

Product 3

+

Prijs: €20

+ +
+
+ + + diff --git a/website/script.js b/website/script.js index 5bf6475..d34a56d 100644 --- a/website/script.js +++ b/website/script.js @@ -124,7 +124,3 @@ function getDescription(title) { return ""; } -// Functie om het modaal venster te sluiten -function closeModal() { - document.getElementById('modal').style.display = 'none'; -} diff --git a/website/style.css b/website/style.css index 0e9db20..bc9a5eb 100644 --- a/website/style.css +++ b/website/style.css @@ -134,3 +134,59 @@ body { #add-to-cart:hover { background-color: #45a049; } + + /* Winkelwagen-icoon */ + .cart-icon { + position: fixed; + top: 20px; + right: 20px; + background-color: #ff6600; + color: white; + padding: 10px 15px; + border-radius: 50%; + font-size: 20px; + cursor: pointer; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.cart-icon:hover { + background-color: #e65c00; +} + +.cart-count { + position: absolute; + top: -5px; + right: -5px; + background: red; + color: white; + font-size: 12px; + font-weight: bold; + padding: 3px 6px; + border-radius: 50%; +} + +/* Productstijl */ +.products { + display: flex; + gap: 20px; + margin: 50px; +} + +.product { + border: 1px solid #ddd; + padding: 20px; + text-align: center; +} + +.product button { + background-color: #ff6600; + color: white; + border: none; + padding: 10px; + cursor: pointer; + margin-top: 10px; +} + +.product button:hover { + background-color: #e65c00; +} \ No newline at end of file From 9bbf82071da9a53714785b23721dfeb743b42d7b Mon Sep 17 00:00:00 2001 From: kitkatpotato16 <523488@vistacollege.nl> Date: Thu, 13 Feb 2025 12:22:06 +0100 Subject: [PATCH 5/9] dejsod --- website/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/script.js b/website/script.js index d2d34c7..81bb526 100644 --- a/website/script.js +++ b/website/script.js @@ -25,7 +25,9 @@ function showCategory(category) { { title: "Fanta orange zero", imageSrc: "media/fanta-zero.jpg", price: 1.80 }, { title: "Fanta exotic zero", imageSrc: "media/fanta-exotic-zero.jpg", price: 1.80 }, { title: "Fanta lemon zero", imageSrc: "media/fanta-lemon-zero.jpg", price: 1.80 }, - { title: "Fanta cassis", imageSrc: "media/fanta-cassis.jpg", price: 1.80 }, ] + { title: "Ice tea", imageSrc: "https://www.manutan.nl/img/S/GRP/ST/AIG12165970.jpg", price: 1.80}, + { title: "Fanta cassis", imageSrc: "media/fanta-cassis.jpg", price: 1.80 }, + { title: "Milkshake", imageSrc: "https://s3.amazonaws.com/static.realcaliforniamilk.com/media/recipes_2/sunset-sprinkle-shakes.jpg", price: 2.50 }, ] } else if (category === 'Warme-Dranken') { items = [ { title: "Chocomel", imageSrc: "media/choco-gs.jpg", price: 1.00 }, From deee7b873f21b2652bf5c7567137162bd3297f5f Mon Sep 17 00:00:00 2001 From: Dylanomz <527457@vistacollege.nl> Date: Thu, 13 Feb 2025 12:23:31 +0100 Subject: [PATCH 6/9] f --- website/cart.js | 6 ------ website/index.html | 18 ------------------ 2 files changed, 24 deletions(-) diff --git a/website/cart.js b/website/cart.js index f936961..7048aac 100644 --- a/website/cart.js +++ b/website/cart.js @@ -56,9 +56,3 @@ function closeModal() { document.getElementById('modal').style.display = 'none'; } -let cartCount = 0; - -function addToCart() { - cartCount++; - document.querySelector('.cart-count').textContent = cartCount; -} diff --git a/website/index.html b/website/index.html index 5c2d5ab..a6d946a 100644 --- a/website/index.html +++ b/website/index.html @@ -69,24 +69,6 @@ 0 - -
-
-

Product 1

-

Prijs: €10

- -
-
-

Product 2

-

Prijs: €15

- -
-
-

Product 3

-

Prijs: €20

- -
-
From 5a9905ffda63a410ad1440f248e37ae74d739816 Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Thu, 13 Feb 2025 12:25:46 +0100 Subject: [PATCH 7/9] wagen --- website/index.html | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/website/index.html b/website/index.html index a6d946a..b6093c1 100644 --- a/website/index.html +++ b/website/index.html @@ -6,6 +6,7 @@ Het hoofdmenu van de Mees + @@ -52,6 +53,12 @@ + +
+ + 0 +
+ @@ -62,13 +69,3 @@ - - -
- - 0 -
- - - - From fc04c74a521ca59322d91974f44dca136dcffafa Mon Sep 17 00:00:00 2001 From: vista-man <524715@vistacollege.nl> Date: Thu, 13 Feb 2025 12:26:41 +0100 Subject: [PATCH 8/9] d --- website/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/index.html b/website/index.html index b6093c1..6c24724 100644 --- a/website/index.html +++ b/website/index.html @@ -55,8 +55,8 @@
- - 0 + + 0