Skip to content

Commit

Permalink
cart update and path related bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
purvathnere authored Jun 5, 2024
1 parent 7b54e0d commit 47de05b
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 35 deletions.
10 changes: 5 additions & 5 deletions account/login-signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ <h4>Login</h4>
<div class="underlineii"></div>
</div>
<div class="EpHS0A">By continuing, you agree to Flipkart's
<a class="c9RDXR" target="_blank" href="../pages/terms">Terms of Use</a>
<a class="c9RDXR" target="_blank" href="../pages/terms/">Terms of Use</a>
and
<a class="c9RDXR" target="_blank" href="../pages/privacypolicy">Privacy Policy</a>.
<a class="c9RDXR" target="_blank" href="../pages/privacypolicy/">Privacy Policy</a>.
</div>
<div class="LSOAQH mt-2">
<button class="QqFHMw twnTnD _7Pd1Fp">Request OTP</button>
Expand All @@ -50,7 +50,7 @@ <h4>Login</h4>
</div>
<!-- signup page -->
<div id="divB">
<div class="signupin">
<div class="signupin container-fluid">
<div class="leftpanal">
<h4>Looks like you're new here!</h4>
<p>Sign up with your mobile number to get started</p>
Expand All @@ -64,9 +64,9 @@ <h4>Looks like you're new here!</h4>
<div class="underlineii"></div>
</div>
<div class="EpHS0A">By continuing, you agree to Flipkart's
<a class="c9RDXR" target="_blank" href="../pages/terms">Terms of Use</a>
<a class="c9RDXR" target="_blank" href="../pages/terms/">Terms of Use</a>
and
<a class="c9RDXR" target="_blank" href="../pages/privacypolicy">Privacy Policy</a>.
<a class="c9RDXR" target="_blank" href="../pages/privacypolicy/">Privacy Policy</a>.
</div>
<div class="LSOAQH mt-2">
<button class="QqFHMw twnTnD _7Pd1Fp">Continue</button>
Expand Down
16 changes: 14 additions & 2 deletions css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,21 @@
}
#cartItems{
position: absolute;
top: -15px;
left: 3px;
top: -8px;
left: 4px;
padding: 0 5px;
border-radius: 50%;
background: red;
width: 18px;
height: 18px;
background-color: #ff6161;
border: 1px solid #fff;
line-height: 16px;
font-size: 12px;
color: #fff;
display: none;
}



@media (max-width: 992px) {
Expand Down
3 changes: 2 additions & 1 deletion css/login-signup.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
background: #f1f3f6;
background: #f1f3f6;
}

#divB {
Expand Down Expand Up @@ -121,6 +121,7 @@ body {
@media screen and (max-width: 800px) {
.signupin .leftpanal {
width: 43vw;
padding: 5px;
}
.signupin .rightSignuppanal {
width: 56vw;
Expand Down
6 changes: 3 additions & 3 deletions header/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
</head>

<body>
<script src="../js/header_bluebg.js"></script>

<!-- Header -->
<header id="header-bluebg">
<nav class="container-fluid" style="background-color: #2874F0;">
<div class="container">
<nav class="navbar bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="/Flipkart_Clone">
<a class="navbar-brand" href="../">
<img src="../img/flipcartlogo.PNG" width="80px">
</a>
<div class="searchBar_h">
Expand All @@ -38,7 +38,7 @@
</div>
<div class="text-white cartLogoandname">
<a href="../viewcart/">
<img src="../img/svg/cart_h.svg" alt="" ><span class="cart_h">Cart </span><span class="text-danger" id="cartItems"></span>
<img src="../img/svg/cart_h.svg" alt="" ><span class="cart_h">Cart </span><span id="cartItems"></span>
</a>
</div>
</div>
Expand Down
16 changes: 15 additions & 1 deletion js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions js/header_bluebg.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,3 @@ document.addEventListener('DOMContentLoaded', () => {
});
});

// for kart
const cartItemsFromStorage = JSON.parse(localStorage.getItem("filteredProducts"));
let cartItems=cartItemsFromStorage.length

document.getElementById("cartItems").innerText=cartItems
6 changes: 5 additions & 1 deletion js/searchIndexProducts.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ fetch('../json-api/product.json')
const filteredProducts = data.filter(product => product.category.toLowerCase().includes(query.toLowerCase()) || product.name.toLowerCase().includes(query));
searchFetch(filteredProducts);
})
.catch(error => console.error('Error fetching data:', error));
.catch(error => console.error('Error fetching data:', error));




30 changes: 15 additions & 15 deletions pages/content-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,23 @@
<h3>Deals on Mobile Phones</h3>
<a href="#">
<div class="img-container">
<img src="img\vivo-mobile-phone-1000x1000.webp" alt="" class="about-img">
<img src="../img/vivo-mobile-phone-1000x1000.webp" alt="" class="about-img">
<p>Vivo T3X 5G
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>14,500*</h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/vivo-y16-mobile-phone-250x250.webp" alt="" class="about-img">
<img src="../img/vivo-y16-mobile-phone-250x250.webp" alt="" class="about-img">
<p>Vivo Y16 5G
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>17,500*</h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/vivo-y17s-forest-green-4gb-ram-128gb-storage-250x250.webp" alt=""
<img src="../img/vivo-y17s-forest-green-4gb-ram-128gb-storage-250x250.webp" alt=""
class="about-img">
<p>Vivo Y17 pro
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>20,500*</h4>
Expand All @@ -148,15 +148,15 @@ <h4>From <i class="fa-solid fa-indian-rupee-sign"></i>20,500*</h4>
</a>
<a href="#">
<div class="img-container">
<img src="img/one.png" alt="" class="about-img">
<img src="../img/one.png" alt="" class="about-img">
<p>OneplusNord N20 5G
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>29,500*</h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/y35-250x250.webp" alt="" class="about-img">
<img src="../img/y35-250x250.webp" alt="" class="about-img">
<p>Vivo Y35 5G
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>22,500*</h4>
</p>
Expand All @@ -169,7 +169,7 @@ <h4>From <i class="fa-solid fa-indian-rupee-sign"></i>22,500*</h4>
<h3>Best of Electronics</h3>
<a href="#">
<div class="img-container">
<img src="img/z-24-200mm-z5-nikon-original-imag2zuekuxgxsgg.webp" alt="camera"
<img src="../img/z-24-200mm-z5-nikon-original-imag2zuekuxgxsgg.webp" alt="camera"
class="about-img">
<p>Mirrorless Cameras
<h4>Shop Now!</h4>
Expand All @@ -178,31 +178,31 @@ <h4>Shop Now!</h4>
</a>
<a href="#">
<div class="img-container">
<img src="img/earphon3.jpg" alt="earphones" class="about-img">
<img src="../img/earphon3.jpg" alt="earphones" class="about-img">
<p>Best wireless Ear...
<h4>Grab Now</h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/Picture.png" alt="shaver" class="about-img">
<img src="../img/Picture.png" alt="shaver" class="about-img">
<p>Best of Shavers
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>1,500*</h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/earphone2.jpg" alt="Headsets" class="about-img">
<img src="../img/earphone2.jpg" alt="Headsets" class="about-img">
<p>Headsets
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>3,500*</h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/projector.png" alt="projector" class="about-img">
<img src="../img/projector.png" alt="projector" class="about-img">
<p>Projector
<h4>From <i class="fa-solid fa-indian-rupee-sign"></i>9,500*</h4>
</p>
Expand All @@ -217,39 +217,39 @@ <h4>From <i class="fa-solid fa-indian-rupee-sign"></i>9,500*</h4>
<h3>Dresses</h3>
<a href="#">
<div class="img-container">
<img src="img/cloth1.webp" alt="cloth" class="about-img">
<img src="../img/cloth1.webp" alt="cloth" class="about-img">
<p><span>Tokiyo Talkies</span><br>Women Bodycon Bl..
<h4>From <i class="fa-solid fa-indian-rupee-sign">379</i></h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/cloth2.webp" alt="cloth" class="about-img">
<img src="../img/cloth2.webp" alt="cloth" class="about-img">
<p><span>Tokiyo Talkies</span><br>Women A-line Multi...
<h4>From <i class="fa-solid fa-indian-rupee-sign">600</i></h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/cloth3.webp" alt="cloth" class="about-img">
<img src="../img/cloth3.webp" alt="cloth" class="about-img">
<p><span>Tokiyo Talkies</span><br>Women Ribbed Pink...
<h4>From <i class="fa-solid fa-indian-rupee-sign">599</i></h4>
</p>
</div>
</a>
<a href="#">
<div class="img-container">
<img src="img/cloth4.webp" alt="cloth" class="about-img">
<img src="../img/cloth4.webp" alt="cloth" class="about-img">
<p><span>Tokiyo Talkies</span><br>Women Ribbed Pink...
<h4>From <i class="fa-solid fa-indian-rupee-sign">299</i></h4>
</p>
</div>
</a>

<div class="box_one">
<img src="img/Oppo_Reno_10_5g.jpg" alt="icon" class="icon">
<img src="../img/Oppo_Reno_10_5g.jpg" alt="icon" class="icon">
<h3 class="heading">Top selling Smartphones</h3>
<p class="heading2">Latest Technology , Best Brands!</p><br>
<button class="btn1">Explore <i class="fa-solid fa-chevron-right"></i></button>
Expand Down
4 changes: 2 additions & 2 deletions plus/plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ document.getElementById("btmTxtP").innerHTML = btmText;

document.addEventListener("DOMContentLoaded", () => {
const components = [
{ id: "header-plus", url: "../components/header/header.html" },
{ id: "footer-plus", url: "../components/footer/footer.html" },
{ id: "header-plus", url: "../header/header.html" },
{ id: "footer-plus", url: "../footer/footer.html" },
];

components.forEach((component) => {
Expand Down

0 comments on commit 47de05b

Please sign in to comment.