From 6e7c582b498307af8c5529107ed44e7aa6a316b6 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Fri, 26 Aug 2022 15:56:20 +0530 Subject: [PATCH 1/6] productDetailsPage 1 --- P_ProductDetailsPage/P_index.html | 20 ++++++ P_ProductDetailsPage/P_index.js | 110 ++++++++++++++++++++++++++++++ P_ProductDetailsPage/P_style.css | 76 +++++++++++++++++++++ 3 files changed, 206 insertions(+) create mode 100644 P_ProductDetailsPage/P_index.html create mode 100644 P_ProductDetailsPage/P_index.js create mode 100644 P_ProductDetailsPage/P_style.css diff --git a/P_ProductDetailsPage/P_index.html b/P_ProductDetailsPage/P_index.html new file mode 100644 index 0000000..51ae787 --- /dev/null +++ b/P_ProductDetailsPage/P_index.html @@ -0,0 +1,20 @@ + + + + + + + + + + + TX + + + +
+ + + + + \ No newline at end of file diff --git a/P_ProductDetailsPage/P_index.js b/P_ProductDetailsPage/P_index.js new file mode 100644 index 0000000..5a885a9 --- /dev/null +++ b/P_ProductDetailsPage/P_index.js @@ -0,0 +1,110 @@ +let data = { + "image": "https://www.jiomart.com/images/product/330x410/rvxfwfpfyt/aadi-men-s-black-synthetic-leather-daily-casual-slider-product-images-rvxfwfpfyt-0-202205312236.jpg", + "title": "Aadi Men's Black Synthetic Leather Daily Casual Slider", + "priceold": 999, + "pricenew": 229, +} +localStorage.setItem("product", JSON.stringify(data)); +// -------------------------------------------------------------------------// + +let products = JSON.parse(localStorage.getItem("product")); +console.log(products) + +let append = () => { + let save=products.priceold-products.pricenew; + document.getElementById("P_container1").innerHTML= + ` +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+

${products.title}

+ +

₹ ${products.pricenew}.00 M.R.P ₹ ${products.priceold}.00


+
+

You Save: ₹ ${save} Inclusive all taxes

+

In Stock

+ +

Inaugural Offer Free Shipping

+ +
+ +

Delivery

+
CHECK
+ +

Delivery Between 29th Aug to 30th Aug

+ + +
Available Offer
2
+ +
+ + +
+
BANK OFFERS
+

SBI Offers

+ +

View 1 offer

+
+
+
COUPONS
+

Flat Rs. 1000 OFF on Mobiles & Electronics

+

View 1 offer

+
+ + +
+ +
+ +
+
+
+ +
+ `; +} + +append(); +document.getElementById("P_cart").addEventListener("click", function(){ +localStorage.setItem("products", JSON.stringify(products)); +// window.location.replace("#") +}); + +document.getElementById("P_buyNow").addEventListener("click", function(){ +localStorage.setItem("products", JSON.stringify(products)); +// window.location.replace("#") +}) + +document.getElementById("P_check").addEventListener("click", function(){ + document.getElementById("P_deliveryAvl").style.display="none"; + + if(document.getElementById("P_pinCode").value.trim().length==6){ + document.getElementById("P_deliveryAvl").style.display="block"; + } + + else{ + document.getElementById("P_deliveryAvl").innerText="Please enter a valid pincode"; + document.getElementById("P_deliveryAvl").style.color="red"; + document.getElementById("P_deliveryAvl").style.display="block"; + + } + +}) diff --git a/P_ProductDetailsPage/P_style.css b/P_ProductDetailsPage/P_style.css new file mode 100644 index 0000000..63dffe2 --- /dev/null +++ b/P_ProductDetailsPage/P_style.css @@ -0,0 +1,76 @@ +*{ + margin: 0; + padding: 0; +} +#P_container1{ + text-align: center; + margin: auto; + margin-top: 30px; + margin-bottom: 20px; + width: 90%; + display: flex; + justify-content: space-around; + + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px; +} +#div1{ + /* margin: auto; */ + width: 40%; + height: 70vh; + display: flex; + justify-content: space-between; + align-items: center; + +} +#div2{ + /* margin: auto; */ + text-align: left; + width: 45%; + height: 120vh; + display: flex; + flex-direction: column; + + box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px; +} +#div11{ + margin: auto; + width: 25%; + display: flex; + flex-direction: column; + justify-content: space-around; + height: 100%; + + +} +#div12{ + margin: auto; + width: 70%; + height: 80%; + + box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; +} +#div12>img{ + margin: auto; + width: 100%; + height: 100%; + +} +#div111{ + width: 80%; + height: 20%; + /* padding: 8px; */ + + box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; +} +#div111>img{ + width: 100%; + height: 100%; + +} +#P_deliveryAvl{ + display: none; +} +#P_check:hover{ + cursor: pointer; +} \ No newline at end of file From e0c75bf45ac6b89f2de3842aa02a645ab9369eca Mon Sep 17 00:00:00 2001 From: Priyanka Date: Fri, 26 Aug 2022 17:25:45 +0530 Subject: [PATCH 2/6] added rating & feedback & return policy sections --- P_ProductDetailsPage/P_index.html | 134 ++++++++++++++++++++++++++- P_ProductDetailsPage/P_style.css | 26 +++++- P_ProductDetailsPage/rate image.jpeg | Bin 0 -> 11777 bytes 3 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 P_ProductDetailsPage/rate image.jpeg diff --git a/P_ProductDetailsPage/P_index.html b/P_ProductDetailsPage/P_index.html index 51ae787..80f0242 100644 --- a/P_ProductDetailsPage/P_index.html +++ b/P_ProductDetailsPage/P_index.html @@ -13,8 +13,140 @@
+ +
+ +

Return Policy

+

Items are eligible for return within 7 Days of Delivery (T&C Apply*)

+ +

All accessories, product & packaging need to be returned in original condition

+ +
+ +
+

Product Rating

+
+
+ +
+ +
+

Rate Product + + + + + + + + + + + +

+ +
+ +
+ + +
+
+
+ - \ No newline at end of file + + \ No newline at end of file diff --git a/P_ProductDetailsPage/P_style.css b/P_ProductDetailsPage/P_style.css index 63dffe2..cac1c07 100644 --- a/P_ProductDetailsPage/P_style.css +++ b/P_ProductDetailsPage/P_style.css @@ -31,7 +31,7 @@ display: flex; flex-direction: column; - box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px; + /* box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px; */ } #div11{ margin: auto; @@ -73,4 +73,28 @@ } #P_check:hover{ cursor: pointer; +} +#returnPolicy{ + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; +} +#productRating{ + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; +} +#solid1{ + display: none; +} +#solid2{ + display: none; +} +#solid3{ + display: none; +} +#solid4{ + display: none; +} +#solid5{ + display: none; +} +#review{ + display: none; } \ No newline at end of file diff --git a/P_ProductDetailsPage/rate image.jpeg b/P_ProductDetailsPage/rate image.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..76e02424093271376a5bf855094d96f55c455115 GIT binary patch literal 11777 zcmd6t2UHZx)~K5tlnf@a4#E%*AfO}>lrZFBNJEmGBn&yDC?X(fm;q5h(vX9sA%o;3 zL2^ct zoN;!KMt)ldfI+_hBL9DtL}p>>YK|+kgWKI)aL#d+wZJjG^`GqZo6Y{@_rKW%29?8= zNx?Cf^}n#$zp$s9vm35V$M5py&Mv=s3dfQTFWi6o`Ypd}eBIJfTMKvA!|hCfD*y!) z09hRWAC=WOa?`X7}c#2xXi ztN>sy3jiqe0f4R_0LTsgS<%0B|L%+brmbu^9VT2mop75q@B**|*Z?KK5ike%aU=x% z0SE%3SCfDoK!E>Sejf>NLP$*bTS$qCiHONa$;rt`$;imBQ(Y&&MtO~ljDm)Ol8Ty| zhMN33Egda29geAg8^QanNkB-7Q>4B|b`6*MzbRK=0UA;u7B7nc?=FB(gGWGvchv$g z5YyU%th)HmM@bSoS+0Uo}JOV;IJOUC@QX)cp0$gw76A%JK#5A-dbnJqp z^f&K5$rxa`A*2b@HjTZfWrcW!9-J4Jg~p_kfjG<_xR|@n;mq8^+5cA;I8VRr;Bv%h z0DL?=A`$|8LPC;1D}YCXPe98qsQJVc@hT>@k?#A>-C{x^**W@qW&^^|AY@ue)71oU zod6Hl3IZD7F>skPfJ&jqa1ntaco67IDDI*V{qxwW-J#D|=vpn01?fWUK&GM`FIKvo z&jLg>V^{I^@KgGQeB4q)R-JBhiMJ}gp;?cAxJV1$JOmDZm)6=uMZ{bAKUw|lLc2b7 z8LO5sujR@cT%{)a#sKmu>`lRNjyt|=irfQI&BhGp7eknG-Th9 zS+I9jsU4S`;F=dpTNa-2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JGvH*pgSucPgH}d$8@Pb!P)? z`qIX7<9&@hxHXUr45%KoL;KI(H``Wce0#E$uhWY+q=qn%623?26)(IyZ;X|&=yEby zUeg@GLY|0BV0g5xzGu6%FGLb8xO&c!oJ^Jzs03e}$s-U3Xsh Ou>KCifguD} Date: Fri, 26 Aug 2022 17:31:39 +0530 Subject: [PATCH 3/6] added rating & feedback & return policy sections2 --- P_ProductDetailsPage/P_index.html | 91 ------------------------------- P_ProductDetailsPage/P_index.js | 91 +++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 91 deletions(-) diff --git a/P_ProductDetailsPage/P_index.html b/P_ProductDetailsPage/P_index.html index 80f0242..55ff693 100644 --- a/P_ProductDetailsPage/P_index.html +++ b/P_ProductDetailsPage/P_index.html @@ -59,94 +59,3 @@

Product Rating

- \ No newline at end of file diff --git a/P_ProductDetailsPage/P_index.js b/P_ProductDetailsPage/P_index.js index 5a885a9..2a5aabc 100644 --- a/P_ProductDetailsPage/P_index.js +++ b/P_ProductDetailsPage/P_index.js @@ -108,3 +108,94 @@ document.getElementById("P_check").addEventListener("click", function(){ } }) + + +let solid1=document.getElementById("solid1"); +let solid2=document.getElementById("solid2"); +let solid3=document.getElementById("solid3"); +let solid4=document.getElementById("solid4"); +let solid5=document.getElementById("solid5"); + +function starFunc1(){ + document.getElementById("empty1").style.display="none"; + solid1.style.display="block"; + solid1.style.color="red"; +} +function starFunc2(){ + document.getElementById("empty1").style.display="none"; + document.getElementById("empty2").style.display="none"; + solid1.style.display="block"; + solid2.style.display="block"; + + solid1.style.color="red"; + solid2.style.color="red"; +} +function starFunc3(){ + document.getElementById("empty1").style.display="none"; + document.getElementById("empty2").style.display="none"; + document.getElementById("empty3").style.display="none"; + solid1.style.display="block"; + solid2.style.display="block"; + solid3.style.display="block"; + + solid1.style.color="yellow"; + solid2.style.color="yellow"; + solid3.style.color="yellow"; +} +function starFunc4(){ + document.getElementById("empty1").style.display="none"; + document.getElementById("empty2").style.display="none"; + document.getElementById("empty3").style.display="none"; + document.getElementById("empty4").style.display="none"; + solid1.style.display="block"; + solid2.style.display="block"; + solid3.style.display="block"; + solid4.style.display="block"; + + solid1.style.color="green"; + solid2.style.color="green"; + solid3.style.color="green"; + solid4.style.color="green"; +} +function starFunc5(){ + document.getElementById("empty1").style.display="none"; + document.getElementById("empty2").style.display="none"; + document.getElementById("empty3").style.display="none"; + document.getElementById("empty4").style.display="none"; + document.getElementById("empty5").style.display="none"; + solid1.style.display="block"; + solid2.style.display="block"; + solid3.style.display="block"; + solid4.style.display="block"; + solid5.style.display="block"; + + solid1.style.color="green"; + solid2.style.color="green"; + solid3.style.color="green"; + solid4.style.color="green"; + solid5.style.color="green"; +} + +let value=0; +function reviewFunc(){ + // let login=JSON.parse(localStorage.getItem("login")); + login="true"; + if(login=="true" && value==0){ + document.getElementById("review").style.display="block"; + value=1; + }else if(login=="true" && value==1){ + document.getElementById("review").style.display="none"; + setTimeout(()=>{ + alert("Thanks for your feedback!"); + },0) + + value=0; + } + + else{ + window.location.replace("../P_SignIn/P_index.html"); + } + let feedback=document.getElementById("reviewInput").value; + + localStorage.setItem("review", JSON.stringify(feedback)); + } \ No newline at end of file From 4337c264a838a336e6c4b812682ec96d7c1bee36 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Fri, 26 Aug 2022 20:17:18 +0530 Subject: [PATCH 4/6] made products as array --- P_ProductDetailsPage/P_index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/P_ProductDetailsPage/P_index.js b/P_ProductDetailsPage/P_index.js index 2a5aabc..92aef11 100644 --- a/P_ProductDetailsPage/P_index.js +++ b/P_ProductDetailsPage/P_index.js @@ -83,13 +83,16 @@ let append = () => { } append(); +let ProductsArr=[]; document.getElementById("P_cart").addEventListener("click", function(){ -localStorage.setItem("products", JSON.stringify(products)); + ProductsArr.push(products); +localStorage.setItem("products", JSON.stringify(ProductsArr)); // window.location.replace("#") }); document.getElementById("P_buyNow").addEventListener("click", function(){ -localStorage.setItem("products", JSON.stringify(products)); + ProductsArr.push(products); +localStorage.setItem("products", JSON.stringify(ProductsArr)); // window.location.replace("#") }) From ca15009cb0006316ff2b9b0a4ba65bb61e6142a9 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Fri, 26 Aug 2022 20:48:59 +0530 Subject: [PATCH 5/6] products2 --- P_ProductDetailsPage/P_index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P_ProductDetailsPage/P_index.js b/P_ProductDetailsPage/P_index.js index 92aef11..85fb256 100644 --- a/P_ProductDetailsPage/P_index.js +++ b/P_ProductDetailsPage/P_index.js @@ -83,7 +83,7 @@ let append = () => { } append(); -let ProductsArr=[]; +let ProductsArr=JSON.parse(localStorage.getItem("products"))||[]; document.getElementById("P_cart").addEventListener("click", function(){ ProductsArr.push(products); localStorage.setItem("products", JSON.stringify(ProductsArr)); From f9db3e2256132673f37d297e922eeadb2db7135f Mon Sep 17 00:00:00 2001 From: Priyanka Date: Sat, 27 Aug 2022 11:16:25 +0530 Subject: [PATCH 6/6] navbar footer added 1 --- P_ProductDetailsPage/P_index.html | 14 ++ P_ProductDetailsPage/P_index.js | 10 +- P_ProductDetailsPage/P_style.css | 4 +- P_ProductDetailsPage/footer.js | 54 +++++ P_ProductDetailsPage/navbar.css | 367 ++++++++++++++++++++++++++++++ P_ProductDetailsPage/navbar1.js | 251 ++++++++++++++++++++ P_ProductDetailsPage/navbar2.js | 98 ++++++++ 7 files changed, 791 insertions(+), 7 deletions(-) create mode 100644 P_ProductDetailsPage/footer.js create mode 100644 P_ProductDetailsPage/navbar.css create mode 100644 P_ProductDetailsPage/navbar1.js create mode 100644 P_ProductDetailsPage/navbar2.js diff --git a/P_ProductDetailsPage/P_index.html b/P_ProductDetailsPage/P_index.html index 55ff693..b876c14 100644 --- a/P_ProductDetailsPage/P_index.html +++ b/P_ProductDetailsPage/P_index.html @@ -8,10 +8,14 @@ + + TX + +
@@ -54,8 +58,18 @@

Product Rating

+ + + + + diff --git a/P_ProductDetailsPage/P_index.js b/P_ProductDetailsPage/P_index.js index 85fb256..e308621 100644 --- a/P_ProductDetailsPage/P_index.js +++ b/P_ProductDetailsPage/P_index.js @@ -72,18 +72,18 @@ let append = () => { -
+
-
-
-
+
+
+
`; } append(); -let ProductsArr=JSON.parse(localStorage.getItem("products"))||[]; +let ProductsArr=[]; document.getElementById("P_cart").addEventListener("click", function(){ ProductsArr.push(products); localStorage.setItem("products", JSON.stringify(ProductsArr)); diff --git a/P_ProductDetailsPage/P_style.css b/P_ProductDetailsPage/P_style.css index cac1c07..1faeec4 100644 --- a/P_ProductDetailsPage/P_style.css +++ b/P_ProductDetailsPage/P_style.css @@ -27,10 +27,10 @@ /* margin: auto; */ text-align: left; width: 45%; - height: 120vh; + height: 100vh; display: flex; flex-direction: column; - + margin-bottom: 20px; /* box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px; */ } #div11{ diff --git a/P_ProductDetailsPage/footer.js b/P_ProductDetailsPage/footer.js new file mode 100644 index 0000000..680a2ef --- /dev/null +++ b/P_ProductDetailsPage/footer.js @@ -0,0 +1,54 @@ +function footer (){ + return ` + + + ` + +} + +export default footer; \ No newline at end of file diff --git a/P_ProductDetailsPage/navbar.css b/P_ProductDetailsPage/navbar.css new file mode 100644 index 0000000..6861ad6 --- /dev/null +++ b/P_ProductDetailsPage/navbar.css @@ -0,0 +1,367 @@ +*{ + padding: 0px; + margin: 0px; + box-sizing: border-box; +} +body{ + width: 100vw; + overflow-x: hidden; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; +} +#Anavbar{ + + position: fixed; + width: 100%; + top: 0; + +} + +#Atopnavbar{ + width: 100%; + top: 0; + height: 80px; + background-color: + #008ecc; + color: aliceblue; + display: flex; + +} +#Alogo{ + width: 30px; + height: 30px; + background: transparent; + margin: 20px; + margin-left: 100%; +} +#Aweblogo{ + margin-left: 80px; + margin-top: 10%; +} + +#Asearch{ + height: 40px; + width: 500px; + padding: 0px 10px; + border-radius: 5px; + margin-left: 25%; + margin-top: 20px; + } + #Alog_sign{ + font-size: 20px; + margin-left: 13%; + margin-top: 13px; + + } + #Auserlogo{ + width: 30px; + height: 30px; + background: transparent; + margin-right: 10px; + position: relative; + top:10px + + } + #Alogin{ + color: aliceblue; + } + #Asignup{ + color: aliceblue; + } + #Acartdiv{ + font-size: 20px; + margin-left: 5%; + margin-top: 13px; + color: aliceblue; + } + #Acartlogo{ + width: 30px; + height: 30px; + background: transparent; + margin-right: 10px; + position: relative; + top:10px + + } + #Alogodiv{ + + position: relative; + cursor: pointer; + left: 20px; + } + #Amenu{ + display: none; + width: 30%; + border: 1px solid gray; + height: 600px; + position: relative; + top: -120px; + background-color: rgb(252, 252, 252); + + } + #Auserlogo2{ + width: 30px; + height: 30px; + margin-right: 20px; + } + #Amenu h2{ + padding: 20px; + } + #Across{ + position: relative; + left: 150px; + font-size: 30px; + font-weight: 600; + width: 30px; + } + #Amenunav{ + background-color: #008ecc; + color: aliceblue; + } + #Aaccount{ + height: 30px; + padding: 0px 50px; + margin-left: 30px; + margin-bottom: 10px; + color: aliceblue; + background-color: #008ecc; + border: 1px solid white; + } + #Aoffer{ + height: 30px; + padding: 0px 50px; + margin-left: 40px; + margin-bottom: 10px; + color: aliceblue; + background-color: #008ecc; + border: 1px solid white; + } + #Aoptions h3{ + color: rgb(54, 52, 52); + margin: 15px 20px; + font-weight:lighter; + + } + #Asearchdiv{ + position:absolute; + width: 500px; + top: 60px; + height: 500px; + left: 30%; + border: 1px solid gray; + visibility: hidden; + overflow: scroll; + background-color:#a3ddf8; + + } + .AappendName{ + display: flex; + border: 1px solid gray; + padding: 20px; + cursor: pointer; + } + #Aclose{ + position:absolute; + padding: 10px; + left: 93%; + + + } + #Adel{ + width: 100px; + } + #Asearchbar{ + position: relative; + left: 114%; + font-size: 25px; + top: -35px; + background-color: aliceblue; + border: none; + cursor: pointer; + } + #Asearchlogo{ + width: 20px; + height: 20px; + } + .sa-menu-bar h3{ + padding-left: 16px; + transition: 100ms; + + } + .sa-menu-bar h3:hover{ + padding-left: 20px; + cursor: pointer; + background-color: rgba(0,0,0,.2); + } + + + *{ + padding: 0px; + margin: 0px; + /* box-sizing: border-box; */ + } + #Adeliver{ + width: 150px; + display: flex; + } + #Adeliver h3{ + color: gray; + font-size: 15px; + } + .Adropdown{ + + width: 100%; + margin: auto; + + background-color: rgb(238, 237, 237); + display: flex; + text-align: center; + height: 40px; + padding-left: 2%; + } + .Adropdown ul{ + display: inline-flex; + z-index: 200; + } + #Aloimg{ + width: 20px; + height: 40px; + margin: 0px 10px 10px 10px; + } + .Adropdown ul li{ + width: 160px; + margin: 5px 2px; + padding: 5px 0px; + list-style: none; + cursor: pointer; + } + .Ainner{ + display: flex; + + padding: 10px; + background-color: rgb(238, 237, 237); + display: none; + + } + .Ainner1{ + width: 200px; + display: none; + } + .Ainner2{ + width: 200px; + display: none; + } + .Adropdown>ul>li:hover{ + background-color: #94b4db; + + } + .Adropdown ul li:hover .Ainner{ + display: block; + width: 400px; + display: flex; + + + } + .Adropdown ul li:hover .Ainner1{ + display: block; + + } + .Ainner1 ul{ + + display: grid; + grid-template-columns: repeat(1,1fr); + background-color: rgb(238, 237, 237); + } + .Adropdown ul li:hover .Ainner2{ + display: block; + position: relative; + /* left: 51px; */ + + } + .Ainner2 ul{ + + display: grid; + grid-template-columns: repeat(1,1fr); + background-color: rgb(238, 237, 237); + } + .Ahr{ + position: relative; + /* left: 50px; */ + } + .Ainner2 ul li{ + width: 90%; + padding: 5px 10px; + margin: 10px 20px; + text-align: left; + } + .Ainner1 ul li{ + width: 90%; + padding: 5px 10px; + margin: 10px 20px; + text-align: left; + } + .Ainner2 ul li:hover{ + background-color: rgb(255, 255, 255); + + color: #0e72ed; + cursor: pointer; + + + } + .Ainner1 ul li:hover{ + background-color: rgb(255, 255, 255); + color: #0e72ed; + cursor: pointer; + + } + + /* //////////////////////////// FOOTER /////////////////////////// */ + + +#sa-footer-container { + display: flex; + width: 100%; + height: 400px; + gap: 40px; + justify-content: center; + align-items: center; + background: rgba(21, 27, 57, .08); + margin-top: 3%; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + +} + +#sa-footer-container .sa-footer-box { + width: 25%; + height: 90%; + line-height: 30px; + padding-left: 1%; +} + +#sa-footer-container .sa-footer-box h5 { + font-weight: bolder; + font-size: 15px; +} + +#sa-footer-container .sa-footer-box p { + color: grey; +} + +#sa-footer-container .sa-footer-box #download { + margin: 0 20px; + text-align: center; +} +#sa-footer-container .sa-footer-box:nth-child(1), #sa-footer-container .sa-footer-box:nth-child(2){ + line-height: 5px; +} +#sa-footer-container .sa-footer-box:last-child { + border-left: 1px solid rgba(128, 128, 128, 0.254); + margin-right: 1%; +} + +#sa-footer-end { + display: flex; + width: 100%; + justify-content: space-evenly; + border-top: 1px solid rgba(128, 128, 128, 0.254); + background: rgba(21, 27, 57, .08); +} \ No newline at end of file diff --git a/P_ProductDetailsPage/navbar1.js b/P_ProductDetailsPage/navbar1.js new file mode 100644 index 0000000..5ebc6db --- /dev/null +++ b/P_ProductDetailsPage/navbar1.js @@ -0,0 +1,251 @@ + + +function navigation(){ + return` +
+
+ +
+
+ +
+
+ + + + +
+
+ +
+
+ + + +
+ +
+ + + + + Sign in / Sign up + +
+
+ + + + 0 + + + Cart + +
+
+ +
+
+ +
+

Deliver to

+

430209

+
+
+
    +
  • + Groceries +
    +
    +
      +
    • Fruits & Vegetables
    • +
    • Dairy & Bakery
    • +
    • Staples
    • +
    • Snacks & Branded Food
    • +
    • Beverages
    • +
    +
    +
    +
    +
      +
    • Personal Care
    • +
    • Home Care
    • +
    • Home & Kitchen
    • +
    • Mom & Baby Care
    • +
    • Books
    • +
    • Pets
    • +
    +
    +
    +
  • +
  • + Premium Fruits +
    +
    +
      +
    • Apples & Pears
    • +
    • Avocado,Peach, Plum
    • +
    • Banana, Melona & Coconut
    • +
    • Cherries, Berries & Exotic Fruits
    • +
    • Citrus, Mango & Grapes
    • +
    +
    +
    +
    +
      +
    • Dates
    • +
    • Gift,Assorted & XL Packs
    • +
    • Pomegranate, Papaya & Pineapple
    • +
    • Seasonal & Minor Fruits
    • +
    • Premium Fruits
    • +
    +
    +
    +
  • +
  • + Home & Kitchen +
    +
    +
      +
    • Kitchenware
    • +
    • Dining
    • +
    • Furnishing
    • +
    • Home Decor
    • +
    • Furniture
    • +
    • Home Appliances
    • +
    • Home Appliances
    • +
    • Toys, Games & Fitness
    • +
    • Electrical
    • +
    • Bathroom & Laundry Accessories
    • +
    • Disposables
    • +
    • Stationery
    • +
    +
    +
    +
    +
      +
    • Bags & Travel Lugguge Mops, Brushes & Scrubs
    • +
    • Auto Care
    • +
    • Garden & Outdoor
    • +
    • Carpentry & work accessories
    • +
    • Pooja Needs
    • +
    • Bathroom & Laundry
    • +
    • Industrial & Scientific Supplies
    • +
    • Home Safety & Automation
    • +
    • Kitchen & Bath Fixtures
    • +
    • Paint, Wall Treatments & Supplies
    • +
    • Power & Hand Tools
    • +
    +
    +
    +
  • +
  • + Fashion + +
    +
      +
    • Men
    • +
    • Women
    • +
    • Boys
    • +
    • Girls
    • +
    • Junior Boys
    • +
    • Infants
    • +
    +
    +
  • +
  • + Electronecs +
    +
      +
    • Mobiles & Tablets
    • +
    • TV & Speaker
    • +
    • Home Appliances
    • +
    • Computers
    • +
    • Cameras
    • +
    • Kitchen Appliances
    • +
    • Personal Care & Grooming
    • +
    • Smart Devices
    • +
    • Gaming
    • +
    • Accessories
    • +
    • Phones
    • +
    • Office Products
    • +
    • Health Care Devices
    • +
    +
    +
  • +
  • + Beauty +
    +
      +
    • Make-Up
    • +
    • Hair
    • +
    • Skin Care
    • +
    • Fragrances
    • +
    • Personal Care
    • +
    • Mom & Baby
    • +
    • Men's Grooming
    • +
    • Tools & Appliances
    • +
    • Covid Essentails
    • +
    • Wellness
    • +
    • Fitness
    • +
    • Ayush
    • +
    • Treatments
    • +
    +
    +
  • +
  • + Jewellary +
    +
      +
    • Fine Jewellary
    • +
    +
    +
  • +
+
+
+
+
+
+

+ + Hello, + Sign in + + +

+
+ + +
+ +
+
+

Home

+

Shop by Category

+

My List

+

JioMart Wallet

+

JioMart Gift Store

+

JioMart Gift Card

+

GoGreen with JioMart

+

All Offers

+
+

My Account

+

Need Help

+

About us

+

Guide

+
+
+
+ +
+ +
+ ` +} + +export default navigation; \ No newline at end of file diff --git a/P_ProductDetailsPage/navbar2.js b/P_ProductDetailsPage/navbar2.js new file mode 100644 index 0000000..c3ddf79 --- /dev/null +++ b/P_ProductDetailsPage/navbar2.js @@ -0,0 +1,98 @@ +import navigation from "../P_ProductDetailsPage/navbar1.js" +let navbar = document.querySelector("#navigation").innerHTML = navigation(); + console.log('heloooo') + + + + +document.getElementById("Alogodiv").addEventListener("click",()=>{ + document.getElementById("Amenu").style.marginLeft="0px"; + document.getElementById("Amenu").style.transition="0.5s all ease-in-out"; + + document.getElementById("Amenu").style.opacity="1"; + document.getElementById("Amenu").style.opacity="1"; + document.getElementById("blur-div").style.marginLeft="0px"; + document.getElementById("blur-div").style.transition="0.9s all ease-in-out"; + document.querySelector("body").style.overflow="hidden"; + + }) + document.getElementById("Across").addEventListener("click",()=>{ + document.getElementById("Amenu").style.marginLeft="-1000px"; + document.getElementById("Amenu").style.transition="1s all ease-in-out"; + document.getElementById("Amenu").style.opacity="0"; + document.getElementById("blur-div").style.marginLeft="-2000px"; + document.getElementById("blur-div").style.transition="0.5s all ease-in-out"; + document.querySelector("body").style.overflow="scroll"; + + }) + + let searchProduct=async (event)=>{ + if(event.key=="Enter"){ + let query=document.getElementById("Asearch").value; + let res= await fetch(`https://secure-waters-87632.herokuapp.com/api/${query}`); + let data=await res.json(); + console.log(data) + + // document.getElementById("Asearchbar").innerHTML="X"; + // document.getElementById("Asearchbar").addEventListener("click",()=>{ + // document.getElementById("Asearchdiv").style.visibility="hidden"; + // document.getElementById("Asearch").value=""; + // let img=document.createElement("img"); + // img.id="Asearchlogo" + + // document.getElementById("Asearchbar").innerText=null; + // document.getElementById("Asearchbar").append(img); + + // }) + appendData(data); + } + + } + document.getElementById('Asearch').addEventListener("keypress",searchProduct); +// document.getElementById("Asearchdiv").innerHTML=null; + + document.getElementById('Asearchbar').addEventListener("click",searchProduct); + + + + cartItemCount() +function cartItemCount(){ + + let cartPlace = document.querySelector('#Aitemcount'); + let cartItem = JSON.parse(localStorage.getItem('products')); + cartPlace.innerHTML = null + cartPlace.innerHTML = cartItem.length + +} + + +let appendData = (data) => { + + console.log(data) + // document.getElementById("Asearchdiv").append(close); + let container = document.querySelector('#Asearchdiv'); + console.log(container) + container.innerHTML = null; + data.forEach(({title,pricenew,image,priceold}) => { + let div1=document.createElement("div"); + + let h3=document.createElement("h3"); + h3.innerText=title + let p=document.createElement("p"); + p.innerText=`Price:- ${pricenew}`; + p.style.marginTop="30px" + div1.append(h3,p) + let img=document.createElement('img'); + img.src=image; + let div=document.createElement('div'); + div.classList.add("AappendName") + div.append(div1,img); + div.addEventListener("click",()=>{ + localStorage.setItem("product",JSON.stringify({title,pricenew,image,priceold})) + }) + console.log(div) + container.append(div) + }); + document.getElementById("Asearchdiv").style.visibility="visible"; + document.getElementById("Asearchdiv").style.display="block"; +}