-
Notifications
You must be signed in to change notification settings - Fork 0
/
SearchShow.html
114 lines (100 loc) · 3.84 KB
/
SearchShow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- cdn -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<!-- JavaScript Bundle with Popper -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"
/>
<!-- my CSS -->
<link rel="stylesheet" href="./css/shopping.css" />
<link rel="stylesheet" href="./css/navbar.css" />
<link rel="stylesheet" href="./css/navbar2.css" />
<link rel="stylesheet" href="./css/popupHover.css" />
<link rel="stylesheet" href="./css/content.css">
<title>search</title>
<style>
#contents {
width: 70vw;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
margin: auto;
}
</style>
</head>
<body>
<!-- navbar -->
<div id="navbar"></div>
<!-- navbarSecond -->
<div id="navbarSecond"></div>
<!-- data appende -->
<div id="contents">
<h2>Products For You</h2>
<div id="ShoppingItems">
<!-- <div class="card">
<div class="itemImg">
<img src="https://assets.myntassets.com/f_webp,dpr_1.5,q_60,w_210,c_limit,fl_progressive/assets/images/1700944/2019/6/8/972c9498-3a37-4d5d-976c-4493b4d5c0021559989322793-HRX-by-Hrithik-Roshan-Men-Yellow-Printed-Round-Neck-T-Shirt--1.jpg" alt="">
</div>
<div class="itemDetail">
<p>Men Cotton Pure Cotton</p>
<p class="itemPrice">
<span>₹ 549</span>
<span> ₹ 1799</span>
<span>30% off</span>
</p>
<p><i class="bi bi-xbox" style="color: green;"> </i>discount on 1st Order</p>
<p class="delivrey"> Free delivery</p>
<span class="rating">3.8<i class="bi bi-star-fill"></i></span><span>30 review</span>
</div>
</div>
-->
</div>
</div>
</body>
</html>
<script type="module">
import navbar from "./components/navbar.js";
import navbarSecond from "./components/navbar2.js";
document.getElementById("navbar").innerHTML = navbar();
document.getElementById("navbarSecond").innerHTML = navbarSecond();
var arr = JSON.parse(localStorage.getItem("arr"));
console.log(arr);
var parent = document.getElementById("ShoppingItems");
arr.map((ele) => {
let random1 = (Math.random() * 100).toFixed();
let random2 = (Math.random() * 100).toFixed();
let random3 = (Math.random() * 5).toFixed();
let random4 = (Math.random() * 10000).toFixed();
parent.innerHTML += `<div class="card">
<div class="itemImg">
<img src=${ele.image_url} alt="image">
</div>
<div class="itemDetail">
<p class="nameOfproduct">${ele.name}</p>
<p class="itemPrice">
<span>₹ ${ele.price}</span>
<span> ₹ ${ele.strikedoffprice}</span>
<span>${random1}% off</span>
</p>
<p class="firstOrderDiscount"><i class="bi bi-xbox" style="color: green;"> </i>₹ ${random2} Discount on 1st Order</p>
<p class="delivrey"> Free delivery</p>
<span class="rating">${random3}<i class="bi bi-star-fill"></i></span><span>${random4} review</span>
</div>
</div>`
});
</script>
<!-- <script src="./shoppingData.js"></script> -->