-
Notifications
You must be signed in to change notification settings - Fork 113
/
merchandise.html
897 lines (788 loc) · 36.7 KB
/
merchandise.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
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
<!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">
<title>Stark Tech Portfolio</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/merchandise.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="website icon" href="/assets/logo/icon.png">
<link rel="icon" href="https://images.wallpapersden.com/image/download/marvel-iron-man-art_68122_2160x3840.jpg" type="image/png">
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
</head>
<body>
<div class="progress-bar">
<div class="filled"></div>
</div>
<!-- Circles -->
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<nav class="navbar h-nav background">
<ul class="nav-list visibility">
<div class="logo" id="ironmask"><a href="/index.html"><img src="assets\logo\icon.png" alt="logo" srcset=""></a></div>
<li> <a href="index.html">Home</a></li>
<li> <a href="index.html#about">About</a></li>
<li> <a href="Appearances.html">Appearances</a></li>
<li> <a href="Comics.html">Comics</a></li>
<li> <a href="index.html#contact">Contact</a></li>
</ul>
<div class="rightNav visibility">
<form class="search-bar">
<input type="text" name="search" placeholder="Search the website">
<button type="submit"><i class="fa-solid fa-magnifying-glass"></i></button>
</form>
</div>
<div class="burger">
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
</div>
</nav>
<section class="movies-section background1" id="home">
<div class="box-main">
</div>
<main>
<!-- Heading -->
<img class="header-img" src="assets/posters/ironmanmovie1.jpg" alt="Iron Man" class="ironman-image">
<h1 class="movies-heading">
Merchandise Store
</h1>
<div class="container">
<!-- Product 1 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/tshirt585.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman T-Shirt</h2>
<p>$25.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman T-Shirt', 25)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman T-Shirt', 25)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 2 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/ironmanmug.webp" alt="Ironman Mug" style="height: 250.531px;">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Mug</h2>
<p>$15.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Mug', 15)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Mug', 15)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 3 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/actionfigure.webp" alt="Ironman T-Shirt" style="height: 250.531px;">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Action Figure</h2>
<p>$50.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Action Figure', 50)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Action Figure', 50)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 4 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/bottle.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Bottle</h2>
<p>$9.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Bottle', 9)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Bottle', 9)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 5 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/keychain.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman keyChain</h2>
<p>$19.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman keyChain', 19)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman keyChain', 19)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 6 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/actionfigure2.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Action Figure</h2>
<p>$25.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Action Figure', 25)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Action Figure', 25)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 7 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/acf3.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Miniature</h2>
<p>$25.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Miniature', 25)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Miniature', 25)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 8 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/ironman_heart.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Keychain</h2>
<p>$15.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Keychain', 15)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Keychain', 15)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 9 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/jacket.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Jacket</h2>
<p>$50.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Jacket', 50)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Jacket', 50)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 10 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/ironman_posters.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Poster</h2>
<p>$25.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Poster', 25)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Poster', 25)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 11 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/reactor_keychain.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Reactor</h2>
<p>$35.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Reactor', 35)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Reactor', 35)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 12 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/stickers.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Stickers Pack</h2>
<p>$23.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Stickers Pack', 23)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Stickers Pack', 23)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 13 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/tony_stark_poster.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman WallPoster</h2>
<p>$25.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman WallPoster', 25)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman WallPoster', 25)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 14 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/wallart.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Wallpaper</h2>
<p>$15.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Wallpaper', 15)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Wallpaper', 15)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 15 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/acf4_.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Action Figure</h2>
<p>$35.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Action Figure', 35)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Action Figure', 35)">Buy Now</button>
</div>
</div>
</div>
<!-- Product 16 -->
<div class="products">
<div class="row">
<img src="assets/merchandise/mask_.webp" alt="Ironman T-Shirt">
<div class="product-text">
<h5>Sale</h5>
</div>
<div class="heart-icon">
<i class="fa-regular fa-heart"></i>
</div>
<div class="ratting">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star-half"></i>
</div>
<div class="price">
<h2>Ironman Mask</h2>
<p>$350.00</p>
</div>
<div class="button-group">
<button class="add-to-cart" onclick="addToCart('Ironman Mask', 350)">Add to Cart</button>
<button class="buy-now" onclick="buyNow('Ironman Mask', 350)">Buy Now</button>
</div>
</div>
</div>
</div>
<div class="floating-cart">
<button id="cartButton" class="cart-button">
<i class="fas fa-shopping-cart"></i>
<span id="cartCount" class="cart-count">0</span>
</button>
<div id="cartPanel" class="cart-panel">
<div class="cart-header">
<h2>Shopping Cart</h2>
<button id="closeCart" class="close-button">
<i class="fas fa-times"></i>
</button>
</div>
<div id="cartItems" class="cart-items">
<!-- Cart items will be added here dynamically -->
</div>
<div class="cart-footer">
<div class="cart-total">
<span>Total:</span>
<span id="cartTotal">$0.00</span>
</div>
<button id="checkoutButton" class="checkout-button">Proceed to Checkout</button>
</div>
</div>
</div>
</main>
<script>
let cart = [];
let total = 0;
// DOM Elements
const cartButton = document.getElementById('cartButton');
const cartPanel = document.getElementById('cartPanel');
const closeCart = document.getElementById('closeCart');
const cartItems = document.getElementById('cartItems');
const cartTotal = document.getElementById('cartTotal');
const cartCount = document.getElementById('cartCount');
const checkoutButton = document.getElementById('checkoutButton');
// Event Listeners
cartButton.addEventListener('click', toggleCart);
closeCart.addEventListener('click', toggleCart);
checkoutButton.addEventListener('click', proceedToCheckout);
function toggleCart() {
cartPanel.classList.toggle('active');
document.body.classList.toggle('cart-open');
}
function addToCart(item, price) {
const existingItem = cart.find(cartItem => cartItem.item === item);
if (existingItem) {
existingItem.quantity++;
existingItem.totalPrice = existingItem.quantity * existingItem.price;
} else {
cart.push({
item: item,
price: price,
quantity: 1,
totalPrice: price
});
}
total += price;
updateCartDisplay();
toggleCart(); // Show cart when item is added
}
function removeFromCart(item) {
const itemIndex = cart.findIndex(cartItem => cartItem.item === item);
if (itemIndex > -1) {
const cartItem = cart[itemIndex];
total -= cartItem.price;
if (cartItem.quantity > 1) {
cartItem.quantity--;
cartItem.totalPrice = cartItem.quantity * cartItem.price;
} else {
cart.splice(itemIndex, 1);
}
updateCartDisplay();
}
}
function updateCartDisplay() {
cartItems.innerHTML = '';
let itemCount = 0;
cart.forEach(item => {
itemCount += item.quantity;
const itemElement = document.createElement('div');
itemElement.className = 'cart-item';
itemElement.innerHTML = `
<div class="item-details">
<div class="item-title">${item.item}</div>
<div class="item-price">$${item.totalPrice.toFixed(2)}</div>
</div>
<div class="quantity-controls">
<button class="quantity-button" onclick="removeFromCart('${item.item}')">-</button>
<span>${item.quantity}</span>
<button class="quantity-button" onclick="addToCart('${item.item}', ${item.price})">+</button>
</div>
`;
cartItems.appendChild(itemElement);
});
cartTotal.textContent = `$${total.toFixed(2)}`;
cartCount.textContent = itemCount;
// Save cart to localStorage
localStorage.setItem('cartItems', JSON.stringify(cart));
localStorage.setItem('cartTotal', total);
}
function proceedToCheckout() {
if (cart.length > 0) {
window.location.href = 'checkout.html';
}
}
// Load cart from localStorage on page load
window.addEventListener('load', () => {
const savedCart = localStorage.getItem('cartItems');
const savedTotal = localStorage.getItem('cartTotal');
if (savedCart && savedTotal) {
cart = JSON.parse(savedCart);
total = parseFloat(savedTotal);
updateCartDisplay();
}
});
</script>
<footer>
<div class="footer background">
<div class="footer-col">
<img src="assets/logo/icon.png" id="ironlogo" alt="">
<p class="footer-p">
Iron Man is a fictional superhero in the Marvel Comics universe, created by writer Stan Lee. His real name is Tony Stark, a billionaire industrialist and genius inventor who builds a high-tech suit of powered armor to fight crime after a life-threatening injury.
</p>
<div class="footer-social">
<a href="#"><i class="fa-brands fa-github"></i></a>
<a href="#"><i class="fa-brands fa-instagram"></i></a>
<a href="#"><i class="fa-brands fa-square-x-twitter"></i></a>
<a href="#"><i class="fa-brands fa-facebook"></i></a>
<a href="#"><i class="fa-brands fa-linkedin"></i></a>
</div>
</div>
<div class="footer-col-main">
<h4 class="h46">Overview</h4>
<a href="index.html">Who is Iron Man?</a>
<a href="#">Franchise</a>
<a href="#">Community</a>
<a href="#">Media Kit</a>
</div>
<div class="footer-col-main">
<h4 class="h46">About Us</h4>
<a href="blog.html">Blogs</a>
<a href="/contributor.html">Contributors</a>
<a href="#">Careers</a>
</div>
<div class="footer-col-main">
<h4 class="h46">Contact Us</h4>
<a href="FAQs.html">Help/Faq's</a>
<a href="index.html#contact">Contact</a>
<a href="PrivacyPolicy.html">Privacy Policy</a>
<a href="Terms&Conditions.html">Terms & Conditions</a>
<a href="#">Advertising</a>
</div>
</div>
<div class="footer-bar background">
<p>
© Copyright 2024- All Rights Reserved -Made With ❤️ by <a class="mygithub" href="https://github.com/aslams2020"><span>Aslam</span> Sayyad</a>
</p>
</div>
</footer>
<button id="BacktoTop">
<div class="circle1">
<svg id="back-to-top" xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-arrow-up-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 0 0 8a8 8 0 0 0 16 0m-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707z"></path>
</svg>
</div>
</button>
<script>
/* Back to Top Button */
const scrollToTopBtn = document.getElementById("BacktoTop");
window.onscroll = function() {
scrollFunction();
};
function scrollFunction() {
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
scrollToTopBtn.style.visibility = 'visible';
scrollToTopBtn.style.opacity = '1';
} else {
scrollToTopBtn.style.visibility = 'hidden';
scrollToTopBtn.style.opacity = '0';
}
}
scrollToTopBtn.addEventListener("click", function() {
// Smooth scroll back to top
window.scrollTo({ top: 0, behavior: 'smooth' });
});
</script>
<script>
window.addEventListener('scroll', function() {
const winScroll = document.body.scrollTop || document.documentElement.scrollTop;
const height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
const scrolled = (winScroll / height) * 100;
document.getElementById('progress-bar').style.width = scrolled + '%';
});
</script>
<!-- form name -->
<script>
function validateText(input) {
const errorMessage = document.getElementById('error-message');
const invalidChars = /[^a-zA-Z\s]/g;
if (invalidChars.test(input.value)) {
errorMessage.style.display = 'inline';
} else {
errorMessage.style.display = 'none';
}
input.value = input.value.replace(invalidChars, '');
}
</script>
<script src="./Js/script.js"></script>
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
<script>
AOS.init();
</script>
<!-- adding automatic focus of cursor -->
<script>
window.onload = function() {
document.getElementById('search-bar').focus();
};
</script>
<!-- making the about section clealy visible when "about" or "home" is clicked -->
<script>
function scrollToSection(event, sectionId) {
event.preventDefault();
const section = document.getElementById(sectionId);
const navbarHeight = 85; // Fixed navbar height
window.scrollTo({
top: section.offsetTop - navbarHeight,
behavior: 'smooth'
});
}
</script>
<script>
// Coordinates for the cursor
const coords = { x: 0, y: 0 };
const circles = document.querySelectorAll(".circle");
// Colors for the circles
const colors = [
"#ffb56b", "#fdaf69", "#f89d63", "#f59761", "#ef865e", "#ec805d",
"#e36e5c", "#df685c", "#d5585c", "#d1525c", "#c5415d", "#c03b5d",
"#b22c5e", "#ac265e", "#9c155f", "#950f5f", "#830060", "#7c0060",
"#680060", "#60005f", "#48005f", "#3d005e"
];
// Assign colors and initial position to each circle
circles.forEach(function (circle, index) {
circle.x = 0;
circle.y = 0;
circle.style.backgroundColor = colors[index % colors.length];
});
// Update the coordinates when the mouse moves
window.addEventListener("mousemove", function (e) {
coords.x = e.clientX;
coords.y = e.clientY;
});
// Animation function to move the circles
function animateCircles() {
let x = coords.x;
let y = coords.y;
circles.forEach(function (circle, index) {
// Update the position and scale of each circle
circle.style.left = x - 12 + "px";
circle.style.top = y - 12 + "px";
circle.style.scale = (circles.length - index) / circles.length;
circle.x = x;
circle.y = y;
// Get the next circle in the sequence
const nextCircle = circles[index + 1] || circles[0];
x += (nextCircle.x - x) * 0.3;
y += (nextCircle.y - y) * 0.3;
});
// Repeat the animation
requestAnimationFrame(animateCircles);
}
// Start the animation
animateCircles();
//js
const filled = document.querySelector('.filled');
function update () {
filled.style.width = `${((window.scrollY) / (document.body.scrollHeight - window.innerHeight) * 100)}%`;
requestAnimationFrame(update);
}
update();
</script>
</body>
</html>