-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
430 lines (362 loc) · 15.4 KB
/
index.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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<html >
<body style= "margin:10px 30px 10px 30px;
height: 100%; background-color:#C5ABDD;">
<!--Navbar erae -->
<div class="navbar">
<nav aria-label="Main Site Links.">
<div id="nav-home" style="list-style-type:none;
margin: 3px;
padding: 8px;
overflow: hidden;
background-color:#333;
height:35px;
word-spacing:200px;">
<a href="#Home" class="nav-item" style="display:inline;
color:white;
text-align:center;
padding: 1px 30px 1px 5px;
text-decoration: none;
font-size:20px;">Home</a>
<a href="#Aboutme" class="nav-item" style="display:inline;
color:white;
text-align:center;
padding: 1px 30px 1px 5px;
text-decoration: none;
font-size:20px;">AboutMe</a>
<a href="#contact" style="display:inline;
color:white;
text-align:center;
padding: 1px 30px 1px 5px;
text-decoration: none;
font-size:20px;"class="nav-item" >Video</a>
<a href="#contact" class="nav-item"style="display:inline;
color:white;
text-align:center;
text-decoration: none;
font-size:20px;">Contact</a>
</div>
</nav>
<!-- first img and tittle-->
</div>
<header class="c-site-header">
<div class="header min-page" id="Home">
<img id="image1" style=" text-align:center;
display:black;
width:100%;
height:auto;
border: 2px solid #1C054C;"src="https://thumbs.dreamstime.com/b/young-woman-programmer-hand-holding-light-bulb-woman-hands-coding-programming-screen-laptop-new-ideas-innovation-142180698.jpg" alt=" home image"/>
<div class="tittle" style="white-space:nowrap;">
<span class="text-space" style=" text-align:center;
top: 20%;
left: 50%;
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
color:white;
background-color:#2f4f4f;
padding:10px 50px;
font-size:40px;
box-sizing:border-box;
border: 3px solid #450EB4;
border-radius: 20%;">My Personal home Page</span>
</div>
</div>
</header>
<!-- Main text erae -->
<main>
<div class="content" id="Aboutme">
<h1 class="aboutme-text" style=" text-align:center;
font-size:46px;
font-weight:bold;
margin:10px 0;"><i>About Me</i></h1>
<p style="text-align:center;
font-size:24px;
line-height:2;"> <b><i>My name is Marziyeh.</i> <br>
<i>Welcome to my home page</i>.😍 </b></p>
<p class="text">
I like programing and I am coding student with best cominity I mean <b>"COD YOUR FUTURE"</b> and I am very happy for this apportunity.
I decided to use code to create the best future possible.
In Iran, I received a bachelor in chemistry, am a professional swimmer, and have served as a swimming instructor and lifeguard. I moved to the UK around two years ago I study English, and a few months ago I found cod your future on the internet, which motivated me to do some research on coding.
</p>
<!-- second img -->
<img src="https://media-exp1.licdn.com/dms/image/C5603AQFf4BiSX-5G0A/profile-displayphoto-shrink_200_200/0/1658686743622?e=1664409600&v=beta&t=L47cVSJLmTqr7Q42cA8yuDWMKWlHMkW4Dl3CqwAkFlU"
style="border: 4px solid #450EB4;
border-radius: 50%;
padding:2px 3px ;
margin:30px 500px;">
</div>
<div class="side-p">
<p> I am a person who is creative. I am continuously looking for
a better life; I enjoy <em>work with computer, cooking,
walking, and socialising with others</em>. I am proud of myself
for making the conscious decision to have a successful life.
</P>
<!--Video erea-->
</div>
<div class="video" id="Video">
<h1 class="video"><i>What is a programming language? </i></h1>
<div class="video-display" style="display:flex;
justify-content:center;
margin-top:20px;">
<iframe style=" text-align: center;
padding: 10px 10px;
margin:10px 120px;
background: radial-gradient(
#450EB4, #DBCFF3 );
border: 2px solid #450EB4;
border-radius: 10px;
font-size:1rem;" src="https://www.youtube.com/embed/EGQh5SZctaE" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen> </iframe>
</div>
</div>
</main>
<!--code blocks-->
<img id="pic" style=" Margin:20px 0px 20px 300px;
border:solid 5px purple;
font-weight: bold;"src="https://media.istockphoto.com/vectors/abstract-background-technology-concept-in-blue-lightbrain-and-human-vector-id1401279296?k=20&m=1401279296&s=612x612&w=0&h=R5tvN7PKVc6nyrIS9jZSnF9YntFaJeZD2elCFwUSztU=
" width="600"/>
<br>
<button id="pervious" style=" Margin:20px 0px 20px 31pc;
border:solid 5px purple;
font-weight: bold;"> pervious </button>
<button id="next" style=" Margin:20px 0px 20px 0px;
border:solid 5px purple;
font-weight: bold;"> next</button>
<!--footer erea -->
<footer class="c-site-footer" style=" font-size:22px;
text-align:center;
color:#3E05B2;
background-color:#DBCFF3;
border:3px solid ;
padding:0px ;
margin:2px 80px;
border-radius:20px;">
<a href="#Home" class="footer-link" >contact me</a>
<div class="content" id="contact">
<h1 class="aboutme-text">Email:</h1>
<p class="text-footer" style=" text-align:center;
background-image: linear-gradient(#1C9DC2, #9C949E);
background-size: auto 200%;
background-position: 0 100%;
transition: background-position 0.5s;"><a href="[email protected]">[email protected]</a>
</p>
</div>
<label for="fname">please write your comment about my personal home page below:</label>
<input style=" font-size:22px;
text-align:center color:#3E05B2;
background-color:#DBCFF3;
border:3px solid ;
padding:0px ;
margin:2px 80px;
border-radius:20px;width:400px; padding:30px ;;" type="text" id="fname" name="fname">
<input type="submit" value="Submit" style="font-size:22px; background-color:#DBCFF3; border:3px solid ;">
</footer>
</body>
<body style=" font-family:'Quicksand', sans-serif; text-align:center;
line-height:1.5em; background: #4A557D;">
<div class="container" style="background-color:#B2B5BE; max-width: 800px;
margin: 1em auto;
background:#FFF;
padding:30px;
border: 4px solid #1C1F44;
border-radius:5px;
background-color:#A8F3CA">
<h1 style="text-align:center;
border:2px solid #1C1F44;padding:10px 5px; margin:10px 150px 20px 150px; color:#E4F2EE; text-shadow:4px 1px #1C1F44; font-size:35px;"> <i>Marziyeh shoes online shop </i></h1>
<p style="font-size:20px; margin:10px 50px 20px 50px;line-height:35px; ">Thank you for visiting my shoe shop page. My store offers high-quality shoes at competitive prices. We also offer free shipping to the UK and a 3-month return policy.</p>
<div id="alerts"></div>
<div class="productcont" style=" display:flex; ">
<div class="product" style=" padding:1em;
border:1px solid #E0E4CC;
margin-right:1em;
border-radius:5px;">
<h3 class="productname"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQnHbKKsGQ980GNFxKt429T5DPUBLvq1C7acA&usqp=CAU width=20px; " style="border:3px solid;">Product 1</h3>
<p style="font-size:25px;"><b>Nike</b></p>
<p class="price">£99.10</p>
<button class="addtocart" style="background-color:pink;">Add To Cart</button>
</div>
<div class="product">
<h3 class="productname"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTBRtV6oYNtZ45qq3nxc9zbp7P2IBH7obbZEA&usqp=CAU width=20px" style="border:3px solid;">Product 2 </h3>
<p style="font-size:25px;"><b>Hoka</b></p>
<p class="price">£130.50</p>
<button class="addtocart" style="background-color:pink;" >Add To Cart</button>
</div>
<div class="product">
<h3 class="productname"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdNapc6DWVY1hthLpV38DlVvJnzjB2STDJpA&usqp=CAU width=20px;"style="border:3px solid;">product 3 </h3>
<p style="font-size:25px;"><b>Nike</b></p>
<p class="price">£100.50</p>
<button class="addtocart" style="background-color:pink;">Add To Cart</button>
</div>
</div>
<div class="cart-container" style="border:1px solid #E0E4CC;
border-radius:5px;
margin-top:1em;
padding:1em;">
<h2 style="border:2px solid #1C1F44; margin:30px 350px 30px 350px; background-color:pink;">Cart</h2>
<table style=" margin-bottom:1em;
border-collapse:collapse;">
<thead style="text-align:left;
padding:0.25em 1em;
border-bottom:1px solid #E0E4CC;">
<tr>
<th style="text-align:left;
padding:0.25em 1em;
border-bottom:1px solid #E0E4CC;"><strong>Product</strong></th>
<th><strong>Price</strong></th>
</tr>
</thead>
<tbody id="carttable">
</tbody>
</table>
<hr style=" border:none;
background:#E0E4CC;
height:1px;">
<table id="carttotals" style=" margin-right:0;
margin-left:auto;">
<tr>
<td><strong>Items</strong></td>
<td><strong>Total</strong></td>
</tr>
<tr>
<td>x <span id="itemsquantity">0</span></td>
<td>£<span id="total">0</span></td>
</tr></table>
<div class="cart-buttons" style=" width:auto;
margin-right:0;
margin-left:auto;
display:flex;
justify-content:flex-end;
padding:1em 0;">
<button id="emptycart" style="margin-right:1em; background-color:pink;">Empty </button>
<button id="checkout" style="background-color:pink;"> please go to Checkout</button>
</div>
</div>
</div>
</body>
<script>
<!--code blocks-->
var srcs;
srcs = ['https://media.istockphoto.com/vectors/girl-face-skin-care-hair-remedy-nature-youth-health-illustration-vector-id1347964524?k=20&m=1347964524&s=612x612&w=0&h=b3Yl04yDe2CEis-KrQ-hDVtg-teVUzcYiuGFFuMuvSg=', 'https://media.istockphoto.com/photos/businessman-is-working-on-desk-opportunity-picture-id987383640?k=20&m=987383640&s=612x612&w=0&h=deGQVeVez3AGnyimHAW4qMiwGBpM1ZuBRaKn7J7dnU4=', 'https://media.istockphoto.com/photos/going-forward-picture-id1285559430?k=20&m=1285559430&s=612x612&w=0&h=EuxfQOGWSU2HhbtkNPWlt8OKJ_7OB37bJU-oWYu9IZ0=', 'https://media.istockphoto.com/vectors/abstract-background-technology-concept-in-blue-lightbrain-and-human-vector-id1401279296?k=20&m=1401279296&s=612x612&w=0&h=R5tvN7PKVc6nyrIS9jZSnF9YntFaJeZD2elCFwUSztU='];
document.getElementById('next').addEventListener('click', (event) => {
srcs.push(srcs.shift());
let element_pic = document.getElementById('pic');
element_pic.setAttribute("src", srcs[0]);
});
document.getElementById('pervious').addEventListener('click', (event) => {
srcs.unshift(srcs.slice(-1)[0]);
let element_pic2 = document.getElementById('pic');
element_pic2.setAttribute("src", srcs.pop());
});
/* button event listeners */
document.getElementById("emptycart").addEventListener("click", emptyCart);
var btns = document.getElementsByClassName('addtocart');
for (var i = 0; i < btns.length; i++) {
btns[i].addEventListener('click', function() {addToCart(this);});
}
/* ADD TO CART functions */
function addToCart(elem) {
//init
var sibs = [];
var getprice;
var getproductName;
var cart = [];
var stringCart;
//cycles siblings for product info near the add button
while(elem = elem.previousSibling) {
if (elem.nodeType === 3) continue; // text node
if(elem.className == "price"){
getprice = elem.innerText;
}
if (elem.className == "productname") {
getproductName = elem.innerText;
}
sibs.push(elem);
}
//create product object
var product = {
productname : getproductName,
price : getprice
};
//convert product data to JSON for storage
var stringProduct = JSON.stringify(product);
/*send product data to session storage */
if(!sessionStorage.getItem('cart')){
//append product JSON object to cart array
cart.push(stringProduct);
//cart to JSON
stringCart = JSON.stringify(cart);
//create session storage cart item
sessionStorage.setItem('cart', stringCart);
addedToCart(getproductName);
updateCartTotal();
}
else {
//get existing cart data from storage and convert back into array
cart = JSON.parse(sessionStorage.getItem('cart'));
//append new product JSON object
cart.push(stringProduct);
//cart back to JSON
stringCart = JSON.stringify(cart);
//overwrite cart data in sessionstorage
sessionStorage.setItem('cart', stringCart);
addedToCart(getproductName);
updateCartTotal();
}
}
/* Calculate Cart Total */
function updateCartTotal(){
//init
var total = 0;
var price = 0;
var items = 0;
var productname = "";
var carttable = "";
if(sessionStorage.getItem('cart')) {
//get cart data & parse to array
var cart = JSON.parse(sessionStorage.getItem('cart'));
//get no of items in cart
items = cart.length;
//loop over cart array
for (var i = 0; i < items; i++){
//convert each JSON product in array back into object
var x = JSON.parse(cart[i]);
//get property value of price
price = parseFloat(x.price.split('$')[1]);
productname = x.productname;
//add price to total
carttable += "<tr><td>" + productname + "</td><td>£" + price.toFixed(2) + "</td></tr>";
total += price;
}
}
//update total on website HTML
document.getElementById("total").innerHTML = total.toFixed(2);
//insert saved products to cart table
document.getElementById("carttable").innerHTML = carttable;
//update items in cart on website HTML
document.getElementById("itemsquantity").innerHTML = items;
}
//user feedback on successful add
function addedToCart(pname) {
var message = pname + " was added to the cart";
var alerts = document.getElementById("alerts");
alerts.innerHTML = message;
if(!alerts.classList.contains("message")){
alerts.classList.add("message");
}
}
/* User Manually empty cart */
function emptyCart() {
//remove cart session storage object & refresh cart totals
if(sessionStorage.getItem('cart')){
sessionStorage.removeItem('cart');
updateCartTotal();
//clear message and remove class style
var alerts = document.getElementById("alerts");
alerts.innerHTML = "";
if(alerts.classList.contains("message")){
alerts.classList.remove("message");
}
}
}
</script>
</html>