From 42af69f6d2a88cd84fba1fab35bbeff3f4540719 Mon Sep 17 00:00:00 2001 From: priya Date: Tue, 8 Oct 2024 18:17:34 +0530 Subject: [PATCH 01/35] added dark mode button --- index.html | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/index.html b/index.html index 2c04a774..d3d689c4 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,9 @@ + + + + + + $${item.price.toFixed(2)} ${item.quantity} @@ -69,23 +101,25 @@ function saveCartToLocalStorage() { document.querySelectorAll('.cart-item').forEach(item => { cartItems.push({ id: item.getAttribute('data-product-id'), + name: item.querySelector('td').textContent, // Fetch the item name from the first price: parseFloat(item.getAttribute('data-product-price')), quantity: parseInt(item.querySelector('.quantity').textContent) }); }); localStorage.setItem('cartItems', JSON.stringify(cartItems)); - updateBadgeCount(); // update badge count after saving + updateBadgeCount(); // Update badge count after saving } -//CODE FOR COUPON RECEIVED ON CLICKING ORDER NOW - // Function to generate a random coupon code - const generateCouponCode = () => { + +// Function to generate a random coupon code +const generateCouponCode = () => { const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let couponCode = ''; for (let i = 0; i < 8; i++) { couponCode += characters.charAt(Math.floor(Math.random() * characters.length)); } return couponCode; -} +}; + // Check if it's the user's first order and apply discount const applyFirstTimeDiscount = () => { let couponCode = localStorage.getItem('couponCode'); @@ -93,12 +127,12 @@ const applyFirstTimeDiscount = () => { couponCode = generateCouponCode(); localStorage.setItem('couponCode', couponCode); } - if(document.getElementById('couponCode')){ + if (document.getElementById('couponCode')) { document.getElementById('couponCode').innerHTML = `Use coupon code ${couponCode} for 30% off!`; alert(`Congratulations! Your coupon code is ${couponCode}. You've received a 30% discount on your first order.`); } - -} +}; + window.onload = applyFirstTimeDiscount; function updateBadgeCount() { From 3d7b307be1e46e28b3746174c8343e7ac4e0de3d Mon Sep 17 00:00:00 2001 From: Kritika754 Date: Sun, 13 Oct 2024 21:55:01 +0530 Subject: [PATCH 09/35] updated card styling --- index.html | 8 ++++++-- style.css | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index ca578726..ee972c87 100644 --- a/index.html +++ b/index.html @@ -293,14 +293,18 @@ background-color:transparent; /* Optional for visual separation */ border-radius: 10px; padding: 20px; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + box-shadow: 0 4px 4px rgba(0, 0, 0, 0.226); display: flex; flex-direction: column; /* Stack content vertically */ align-items: center; max-width: 350px; /* Maximum width of each card */ flex: 1 1 280px; /* Allow boxes to grow and shrink */ min-width: 300px; /* Minimum width for responsiveness */ - min-height: 480px; /* Minimum height for the card */ + min-height: 200px; /* Minimum height for the card */ +} + +.box:hover{ + border: 1px solid black; } .card-image { diff --git a/style.css b/style.css index e7549cae..28d05584 100644 --- a/style.css +++ b/style.css @@ -250,6 +250,8 @@ body { .order_btn:hover { background-color: hsl(357, 82%, 45%); } + + From 36a7917957f31b9b48fcbb373fa04591aeefa283 Mon Sep 17 00:00:00 2001 From: Diya Saha <168462932+Diya-Saha2005@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:37:18 +0530 Subject: [PATCH 10/35] Change in the menu-item section Changes made are: 1. Added few more food tabs 2. Corrected some spelling mistakes 3. Added a horizontal scroll bar for easy access --- index.html | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index d148c6a7..02b8b16f 100644 --- a/index.html +++ b/index.html @@ -549,31 +549,47 @@

"Get r -