-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.html
266 lines (250 loc) · 9.47 KB
/
home.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!-- Home Page (home.html) -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home Page</title>
<link rel="stylesheet" href="home.css">
<link
rel="icon"
type="image/x-icon"
href="https://www.imgbly.com/ib/toTY2LN1jV.jpg"
style="border-radius: 50%" />
<link rel="stylesheet" href="magicscroll/magicscroll.css" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA=="
crossorigin="anonymous"
referrerpolicy="no-referrer" />
<script src="magicscroll/magicscroll.js"></script>
<link
href="https://fonts.googleapis.com/css?family=Lato"
rel="stylesheet" />
</head>
<body>
<div class="header" id="header">
<div class="header-content">
<div class="content">
<img
src="https://www.imgbly.com/ib/toTY2LN1jV.jpg"
height="100px"
width="100px"
style="vertical-align: middle; border-radius: 15%" />
<div class="content__container">
<p class="content__container__text">MonSan</p>
<ul class="content__container__list">
<li class="content__container__list__item">Books 📚</li>
<li class="content__container__list__item">Cards 🎴</li>
<li class="content__container__list__item">Blogs 👨💻</li>
<li class="content__container__list__item">Articles 📄</li>
</ul>
</div>
</div>
<div class="share-buttons">
<a
href="https://www.facebook.com/profile.php?id=61551090667008&mibextid=ZbWKwL"
class="facebook"
><img
src="https://img.icons8.com/plasticine/100/facebook-new.png"
alt="Facebook"
/></a>
<a href="" class="youtube"
><img
src="https://img.icons8.com/plasticine/100/youtube-play--v1.png"
alt="youtube-play--v2"
alt="youtube"
/></a>
<a href="https://x.com/ishan_kumar10?s=08" class="twitter"
><img
src="https://img.icons8.com/plasticine/100/twitter.png"
alt="Twitter"
/></a>
<a
href="https://instagram.com/ishan.kumarofficial?igshid=OGQ5ZDc2ODk2ZA=="
class="insta"
><img
src="https://img.icons8.com/plasticine/100/instagram-new--v1.png"
alt="instagram-new--v1"
alt="insta"
/></a>
<a
href="https://www.linkedin.com/in/ishan-kumar-0b34b5279?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app"
class="linkin"
><img
src="https://img.icons8.com/plasticine/100/linkedin.png"
alt="LinkedIn"
/></a>
<a href="https://pin.it/2Y3Sodh" class="pins"
><img
src="https://img.icons8.com/plasticine/100/pinterest--v1.png"
alt="pins"
/></a>
</div>
</div>
</div>
<div class="navbar" id="navbar">
<div class="navbar-content">
<nav>
<ul>
<li>
<form action="https://www.google.com/search" method="get">
<input type="text" name="q" placeholder="Search Books..." />
</form>
</li>
               
<li alt="mode"><span id="mode-icon" onclick="toggleMode()" class="fas fa-sun"></span></li>
<li>
<a href="book.html"
><span class="material-symbols-outlined"> home </span>Home</a
>
</li>
<li>
<a href="#"
><span class="material-symbols-outlined"> build </span
>Services</a
>
<ul>
<li><a href="#">Cards</a></li>
<li><a href="#">Blogs</a></li>
<li><a href="#">Article</a></li>
</ul>
</li>
<li>
<a href="#"
><span class="material-symbols-outlined"> person </span>Login</a
>
</li>
<li>
<a href="cart.html"
><span class="material-symbols-outlined"> shopping_cart </span
>Cart</a
>
</li>
<li>
<a href="home.html"
><span class="material-symbols-outlined"> category </span>Products</a
>
</li>
</ul>
</nav>
</div>
</div>
<br />
<br><br><br><br><br><br><br><br><br><br><br>
<div id="products">
<h2>Available Products</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Price(UDS)</th>
<th>Action</th>
</tr>
</thead>
<tbody id="product-items">
<!-- Product items will be dynamically added here -->
</tbody>
</table>
</div>
<div class="footer">
<div class="footer-details">
<div class="footer-img">
<div class="img">
<img
src="https://www.imgbly.com/ib/toTY2LN1jV.jpg"
class="website-logo"
style="
height: 50px;
width: 50px;
border-radius: 7px;
margin: 2rem;
" />
</div>
<div class="logo-name">
<p>MonSan Book Store</p>
</div>
</div>
<div>
<p class="footer-head">Online books</p>
<a href="#" class="footer-ele">Wide Range</a>
<a href="#" class="footer-ele">Free Trial</a>
<a href="#" class="footer-ele">Pricing</a>
<a href="#" class="footer-ele">Developers</a>
<a href="#" class="footer-ele">Accuracy</a>
</div>
<div>
<p class="footer-head">Latest Cards</p>
<a href="#" class="footer-ele">Soft copies</a>
<a href="#" class="footer-ele">Latest</a>
</div>
<div>
<p class="footer-head">Blogs</p>
<a href="#" class="footer-ele">Interactive</a>
<a href="#" class="footer-ele">Individual</a>
</div>
<div>
<p class="footer-head">Resources</p>
<a href="#" class="footer-ele">API Resources</a>
<a href="#" class="footer-ele">Blog</a>
<a href="#" class="footer-ele">Frequently asked questions</a>
</div>
</div>
<div class="footer-share">
<a href="#"><i class="fa-brands fa-instagram"></i></a>
<a href="#"><i class="fa-brands fa-twitter"></i></a>
<a href="#"><i class="fa-brands fa-facebook"></i></a>
</div>
</div>
<div class="line"></div>
<p style="text-align: center">
Copyright © Ishan Kumar - FEE Project 2023<br />
<script>
// Sample product data (replace this with your actual product data)
const products = [
{ name: 'Bhagavad Gita', price: 19.99 },
{ name: 'Mahabharat', price: 29.99 },
{ name: ' Ramcharitmanas ', price: 59.99 },
{ name: ' Bhagwan Parshuram ', price: 52.99 },
{ name: ' Sunderkand ', price: 23.99 },
{ name: 'Wings Of Fire ', price: 96.99 },
{ name: ' Jai Somnath ', price: 12.99 },
{ name: ' Daanveer Kran ', price: 52.99 },
{ name: ' Bhagwan Parshuram ', price: 87.99 },
{ name: 'Shiv Puran', price: 26.99 }
// Add more products as needed
];
// Function to display products on the home page
function displayProducts() {
const productItemsElement = document.getElementById('product-items');
// Clear previous product items
productItemsElement.innerHTML = '';
// Populate the product table with the items
products.forEach(product => {
const row = document.createElement('tr');
row.innerHTML = `
<td>${product.name}</td>
<td>${product.price.toFixed(2)}</td>
<td><button onclick="addToCart('${product.name}', ${product.price})">Add to Cart</button></td>
`;
productItemsElement.appendChild(row);
});
}
// Function to add a product to the cart
function addToCart(name, price) {
const cart = JSON.parse(localStorage.getItem('cart')) || [];
const newItem = { name, price };
// Add the new item to the cart
cart.push(newItem);
// Update the cart data in localStorage
localStorage.setItem('cart', JSON.stringify(cart));
}
// Initial display of products on page load
displayProducts();
</script>
</body>
</html>