From 274c64d1ca09c0afcbcfc0d22ee40f5aff84ffc6 Mon Sep 17 00:00:00 2001 From: lovishGIT <127772046+lovishGIT@users.noreply.github.com> Date: Mon, 23 Oct 2023 04:48:53 +0530 Subject: [PATCH 1/2] issue#6 updates layout issues at menu.html menu table. --- menu.css | 6 ++++++ menu.html | 22 +++++++++++----------- menu.js | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/menu.css b/menu.css index 31b24b4..cc6c571 100644 --- a/menu.css +++ b/menu.css @@ -124,4 +124,10 @@ div.col h3{ .cartsidebar{ background-color: black; width: 100px; +} + +.flex-menu { + display: flex; + justify-content: space-between; + gap: 1px; } \ No newline at end of file diff --git a/menu.html b/menu.html index 8d9f6b9..524dcd9 100644 --- a/menu.html +++ b/menu.html @@ -103,52 +103,52 @@

CAFE MENU

ITEMS PRICE - + Hot Coffee Rs.80 - + Black Coffee Rs.80 - + Hazelnut Cold Coffee Rs.125 - + Chocolate Cold Coffee Rs.125 - + Caramel Cold Coffee Rs.125 - + Classic Cold Coffee Rs.100 - + Iced Americano Rs.160 - - Add + + Maggie Rs.30 - - Add + + diff --git a/menu.js b/menu.js index 9e9fc94..776e82a 100644 --- a/menu.js +++ b/menu.js @@ -81,7 +81,7 @@ function updatecart(cart){ document.getElementById("r"+item).innerHTML=``; } else{ - document.getElementById("r"+item).innerHTML="
"+cart[item].quantity+"
"; + document.getElementById("r"+item).innerHTML=`
${cart[item].quantity}
`; } } localStorage.setItem('cart', JSON.stringify(cart)); From 3b8fd10ae3a43c867a70e22bd7b13982411c731f Mon Sep 17 00:00:00 2001 From: lovishGIT <127772046+lovishGIT@users.noreply.github.com> Date: Mon, 23 Oct 2023 04:58:07 +0530 Subject: [PATCH 2/2] issue#7 Step 1 Area need to be a clickable and should directly be taking you to menu.html solved issue. --- order.css | 8 ++++++++ order.html | 19 +++++++++---------- order.js | 37 ++++++++++++++++--------------------- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/order.css b/order.css index 054e01a..f3ce83b 100644 --- a/order.css +++ b/order.css @@ -88,4 +88,12 @@ body{ padding: 8px; border-radius: 20px; text-align: center; +} + +.hide_as_link { + text-decoration: none; + color: #000000; +} +.hide_as_link :active { + color: #000000; } \ No newline at end of file diff --git a/order.html b/order.html index a40562d..b18123e 100644 --- a/order.html +++ b/order.html @@ -62,16 +62,15 @@ -
-
-

Step 1 - My Awesome Cart Express Checkout - Review Your Cart items

-
-
- -
- -
-
+
+ +

Step 1 - My Awesome Cart Express Checkout - Review Your Cart items

+
+
+ +
+
+

Step 2 - Enter Address & Other Details

diff --git a/order.js b/order.js index 88f9690..009a576 100644 --- a/order.js +++ b/order.js @@ -7,26 +7,21 @@ $(document).ready(function () { listcart(cart); }); function listcart(cart) { - let str=``; - if (cart == {}) { - str += `
-
Your Cart is Empty........
+ let str_order=``; + for (let item in cart) { + str_order+=`
+
+ `+cart[item].name+` +
+
+ x`+ cart[item].quantity +` +
+
+ = Rs.`+ (cart[item].price)*(cart[item].quantity) +` +
` - } - else{ - for (let item in cart) { - str+=`
-
- `+cart[item].name+` -
-
- x`+ cart[item].quantity +` -
-
- = Rs.`+ (cart[item].price)*(cart[item].quantity) +` -
-
` - } - } - document.getElementById("items").innerHTML=str; + } + + if(str_order == ``) str_order = `
Your Cart is Empty. Click here to Go to Menu
`; + document.getElementById("items").innerHTML= str_order; }