forked from Tejashri-Taral/TrendTrove-Ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
850 lines (723 loc) · 28.9 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="images/logo1.png" type="image/x-icon">
<title>TrendTrove - Ecommerce</title>
<link rel="stylesheet" href="preloaderStyle.css">
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css">
<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" />
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" herf="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="./Style/popup.css">
</head>
<body>
<!-- preloader -->
<div id="preloader">
<div class="wrapper">
<div class="box-wrap">
<div class="box one"></div>
<div class="box two"></div>
<div class="box three"></div>
<div class="box four"></div>
<div class="box five"></div>
<div class="box six"></div>
</div>
</div>
</div>
<!-- ProgressBar -->
<div id="progress-bar"></div>
<!-- ProgressBar Ends -->
<!-- header section -->
<header class="header" id="header">
<div class="logo">
<a href="/"> <img src="images/logo.png" alt="Logo" srcset=""> </a>
<i class="fa-solid fa-bars menu" id="menu"></i>
</div>
<nav class="bg-neutral-100 py-20">
<div class="tabs-container">
<ul id="tabs" class="tabs">
<li class="tab">
<a href="index.html">Home</a>
<div class="cursor"></div>
</li>
<li class="tab">
<a href="about.html">About</a>
<div class="cursor"></div>
</li>
<li class="tab">
<a href="features.html">Features</a>
<div class="cursor"></div>
</li>
<li class="dropdown tab">
<a class="dropdown-parent">Products</a>
<div class="cursor"></div>
<ul class="dropdown-content ">
<li><a href="mens.html" class="priye">Men</a>
</li>
<li><a href="womens.html">Women</a></li>
<li><a href="child.html">Kid Section</a></li>
</ul>
</li>
<li class="tab" style="margin-left: 15px;">
<a href="contact.html">Contact Us</a>
<div class="cursor"></div>
</li>
</ul>
</div>
</nav>
<nav class="utils">
<ul class="nav-links">
<li class="nav-link">
<i class="fa-solid fa-cart-shopping"></i>
</li>
<li class="nav-link">
<a href="login-sginup.html">
<i class="fa-solid fa-user"></i>
</a>
</li>
<li class="nav-link">
<i class="fa-solid fa-magnifying-glass" id="search-icon"></i>
</li>
</ul>
</nav>
</header>
<!-- Search Bar -->
<div id="search-bar">
<input type="text" id="search" placeholder="Search..." />
<button type="submit" id="search-btn">Go</button> <!-- Add ID to the button -->
</div>
<script src="preloader.js"></script>
<style>
/* Style for the search bar, initially hidden */
#search-bar {
display: none;
position: absolute;
top: 60px; /* Adjust this to position the search bar just below the icon */
right: 20px; /* Align with the icon */
background-color: white;
padding: 10px;
border-radius: 5px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* Styling the input box and button */
#search-bar input {
padding: 5px;
width: 200px;
border: 1px solid #ccc;
border-radius: 3px;
outline: none;
}
#search-bar button {
padding: 5px 10px;
background-color:black;
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
}
#search-bar button:hover {
background-color:black;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', (event) => {
// Get the search icon and search bar elements
const searchIcon = document.getElementById("search-icon");
const searchBar = document.getElementById("search-bar");
// Toggle the visibility of the search bar when the icon is clicked
searchIcon.onclick = function() {
if (searchBar.style.display === "none" || searchBar.style.display === "") {
searchBar.style.display = "block"; // Show the search bar
searchBar.querySelector('input').focus(); // Automatically focus on the input field
} else {
searchBar.style.display = "none"; // Hide the search bar
}
}
// Search button functionality
const searchBtn = document.getElementById("search-btn");
searchBtn.onclick = function() {
var query = document.getElementById('search').value;
if(query) {
console.log("Search query:", query);
// Implement your search logic here, such as a redirect or an API call
// window.location.href = '/search-results?q=' + encodeURIComponent(query);
// Hide the search bar after clicking "Go"
searchBar.style.display = "none";
} else {
console.log("No search query entered");
}
}
});
</script>
<!-- banner area -->
<section class="banner">
<div class="slide">
<div class="slide-details" data-aos="fade-up" data-aos-easing="ease-in-out">
<h1>Discover Tomorrow’s Trends Today with TrendTrove!</h1>
<p>
At TrendTrove, we bring you the most stylish and trendy fashion items, all in one place!
</p>
<button class="btn">
Explore More
</button>
</div>
</div>
</section>
<!-- Pop up Html -->
<!-- Pop-up for email registration -->
<div id="popup" class="popup">
<div class="popup-content">
<div class="popup-left">
<img src="images/popup1.jpg" alt="Fashion Image">
</div>
<div class="popup-right">
<a href="#" class="no-thanks"><img class="popuplogo" src="images/logo.png" alt="Logo" srcset=""></a>
<h1>Join TrendTrove!</h1>
<h2 class="popuph2">Unlock Your Fashion</h2>
<p>Sign up now to enjoy <strong> 20% off </strong> your first order and exclusive updates on the latest trends.</p>
<form id="emailForm">
<input type="email" id="popup-email" placeholder="Enter your email" required>
<button type="submit" class="signup-btn">Continue</button>
</form>
<a href="#" class="no-thanks close-btn">No thanks, I’ll shop full price</a>
<p class="terms">By signing up, you agree to our <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a>.</p>
</div>
</div>
</div>
<!-- featured section -->
<section class="featured">
<div class="featured-box-1">
<div class="overlay">
<button class="btn btn-white">
Shop Clothing
</button>
</div>
<div class="bg-image">
<img src="./images/youngcouple1.jpg" alt="product">
</div>
</div>
<div class="featured-box-2">
<div class="featured-box-2-box-1">
<div class="overlay">
<a href="./products/sunglasses.html" class="btn btn-white">
Shop Sunglasses
</a>
</div>
<div class="bg-image">
<img src="./images/shop-glasses.webp" alt="product">
</div>
</div>
<div class="featured-box-2-box-2">
<div class="overlay">
<a href="./products/bags.html" class="btn btn-white">
Shop Bags
</a>
</div>
<div class="bg-image">
<img src="./images/shop-bags.webp" alt="product">
</div>
</div>
<div class="featured-box-2-box-3">
<div class="overlay">
<a href="./products/sandals.html" class="btn btn-white">
Shop Sandals
</a>
</div>
<div class="bg-image">
<img src="./images/shop-sandals.webp" alt="product">
</div>
</div>
</div>
<div class="featured-box-3">
<div class="overlay">
<a href="sneaker.html" class="btn btn-white">
Shop Sneakers
</a>
</div>
<div class="bg-image">
<img src="./images/shop-sneakers.webp" alt="product">
</div>
</div>
</section>
<!-- products section -->
<section class="products">
<h1 class="section-title">Top Products Of The Season!</h1>
<div class="products-list">
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/blackstrippedmaneffectimage.jpg" alt="product">
</div>
<div class="effect-image">
<img src="./images/blackstrippedmannormal.jpeg" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">Black Striped Shirt</p>
<p class="product-price">- $199</p>
</div>
</div>
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/product2.jpg" alt="product">
</div>
<div class="effect-image">
<img src="./images/product2-effect.jpg" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">Black Top</p>
<p class="product-price">- $99</p>
</div>
</div>
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/product3-effect.jpg" alt="product">
</div>
<div class="effect-image">
<img src="./images/product3.webp" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">Olive Green Top</p>
<p class="product-price">- $100</p>
</div>
</div>
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/whitetshirtmen.jpeg" alt="product">
</div>
<div class="effect-image">
<img src="./images/whitetshirtmeneffect.jpeg" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">White T-shirt</p>
<p class="product-price">- $100</p>
</div>
</div>
</div>
</section>
<!-- category section -->
<section class="categories">
<div class="category" data-aos="zoom-in" data-aos-delay="200">
<div class="cat-img">
<img src="./images/category1.webp" alt="category">
</div>
<div class="product-details">
<p class="product-name">Night Suits</p>
</div>
</div>
<div class="category" data-aos="zoom-in" data-aos-delay="200">
<div class="cat-img">
<img src="./images/category2.webp" alt="category">
</div>
<div class="product-details">
<p class="product-name">Hand Bags</p>
</div>
</div>
<div class="category" data-aos="zoom-in" data-aos-delay="200">
<div class="cat-img">
<img src="./images/category3.webp" alt="category">
</div>
<div class="product-details">
<p class="product-name">Funky Tops</p>
</div>
</div>
</section>
<!-- products section 2 -->
<section class="products">
<h1 class="section-title">Most Bought Products Of The Month!</h1>
<div class="products-list">
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/product5.jpg" alt="product">
</div>
<div class="effect-image">
<img src="./images/product5-effect.jpg" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">Black Top</p>
<p class="product-price">- $100</p>
</div>
</div>
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/product6.jpg" alt="product">
</div>
<div class="effect-image">
<img src="./images/product6-effect.jpg" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">Red Top</p>
<p class="product-price">- $100</p>
</div>
</div>
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/tealimageshirtmen.jpeg" alt="product">
</div>
<div class="effect-image">
<img src="./images/tealshirtmeneffect.jpeg" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">Light Teal Shirt</p>
<p class="product-price">- $199</p>
</div>
</div>
<div class="product" data-aos="fade-up" data-aos-delay="200">
<div class="product-image">
<div class="main-image">
<img src="./images/product8.jpg" alt="product">
</div>
<div class="effect-image">
<img src="./images/product8-effect.jpg" alt="product">
</div>
<div class="overlay-image">
<button class="heartbtn" id="heart">
❤
</button>
</div>
</div>
<div class="product-details">
<p class="product-name">Black Top</p>
<p class="product-price">- $399</p>
</div>
</div>
</div>
</section>
<!-- shop from insta section -->
<section class="insta">
<h1 class="section-title">Shop From The Gram</h1>
<div class="posts">
<div class="post-image" data-aos="zoom-in" data-aos-delay="200">
<i class="fa-brands fa-instagram"></i>
<img src="./images/insta1.webp" alt="insta">
</div>
<div class="post-image" data-aos="zoom-in" data-aos-delay="200">
<i class="fa-brands fa-instagram"></i>
<img src="./images/insta2.webp" alt="insta">
</div>
<div class="post-image" data-aos="zoom-in" data-aos-delay="200">
<i class="fa-brands fa-instagram"></i>
<img src="./images/insta3.webp" alt="insta">
</div>
<div class="post-image" data-aos="zoom-in" data-aos-delay="200">
<i class="fa-brands fa-instagram"></i>
<img src="./images/insta4.webp" alt="insta">
</div>
<div class="post-image" data-aos="zoom-in" data-aos-delay="200">
<i class="fa-brands fa-instagram"></i>
<img src="./images/insta5.webp" alt="insta">
</div>
<div class="post-image" data-aos="zoom-in" data-aos-delay="200">
<i class="fa-brands fa-instagram"></i>
<img src="./images/insta6.webp" alt="insta">
</div>
</div>
<div class="feedback-container">
<h2>Have a feedback? <a href="feedback.html" target="_blank">Click here to provide feedback</a></h2>
</div>
</section>
<!-- footer section -->
<footer class="footer">
<div class="footer-section">
<h1>Contact Us</h1>
<ul class="footer-list">
<li>[email protected]</li>
<li>
2nd Floor, Bandra West, Mumbai, Maharashtra 400050, India
</li>
<li>+91 xxxxxx2020</li>
<li class="border-list">
</li>
<li class="socials">
<a href="https://www.linkedin.com/in/tejashri-taral-5006a82a0/" id="linkedin" target="_blank">
<i class="fa-brands fa-linkedin"></i>
</a>
<a href="https://github.com/Tejashri-Taral" id="github" target="_blank">
<i class="fa-brands fa-github"></i>
</a>
<a href="https://x.com/Tejashri_10?t=SWxALwKxy-nVrTcbYTFUcA&s=08" id="twitter" target="_blank">
<i class="fa-brands fa-x-twitter"></i>
</a>
<a href="https://www.instagram.com/your_instagram" id="instagram" target="_blank">
<i class="fa-brands fa-instagram"></i>
</a>
</li>
</ul>
</div>
<div class="footer-section">
<h1>Quick Links</h1>
<ul class="footer-list">
<li><a href="about.html">About Us</a></li>
<li><a href="faq.html">FAQ's</a></li>
<li><a href="terms-conditions.html">Terms & Conditions</a></li>
<li><a href="return-policy.html">Return Policy</a></li>
<li><a href="https://github.com/Tejashri-Taral/TrendTrove-Ecommerce" target="_blank">Star Us</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
<div class="footer-section">
<h1>Subscribe to Newsletter</h1>
<ul class="footer-list">
<li>Be the first to know about exclusive deals and new arrivals straight to your inbox.</li>
<li>Join our fashion community today!</li>
<li class="sub">
<input type="email" placeholder="Enter your email here" id="email-input">
<button class="btn" id="open-btn">Subscribe</button>
</li>
</ul>
</div>
</footer>
<div class="footer-copyright">
<div id="copyright">© 2024 TrendTrove. All Rights Reserved.</div>
</div>
<div class="modal-box" id="modalbox" style="display: none;">
<div class="modal" id="modal">
<div id="close-btn">×</div>
<div class="modal-content">
<img src="images\confirmation.png" alt="" height="100px" >
<h2>Subscription Successful!</h2>
<p>Thank you for subscribing.</p>
<p> You will receive notifications, updates via email.</p>
</div>
<div class="social">
<li class="socials">
<a href="https://www.linkedin.com/in/tejashri-taral-5006a82a0/" id="linkedin" target="_blank">
<i class="fa-brands fa-linkedin"></i>
</a>
<a href="https://github.com/Tejashri-Taral" id="github" target="_blank">
<i class="fa-brands fa-github"></i>
</a>
<a href="https://x.com/Tejashri_10?t=SWxALwKxy-nVrTcbYTFUcA&s=08" id="twitter" target="_blank">
<i class="fa-brands fa-x-twitter"></i>
</a>
<a href="https://www.instagram.com/your_instagram" id="instagram" target="_blank">
<i class="fa-brands fa-instagram"></i>
</a>
</li>
</div>
</div>
</div>
<script>
let openbtn = document.getElementById('open-btn');
let modalbox = document.getElementById('modalbox');
let closebtn = document.getElementById('close-btn');
let emailInput = document.getElementById('email-input');
// Email validation function
function isValidEmail(email) {
// Regular expression for validating an email
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return regex.test(email);
}
openbtn.addEventListener('click', function () {
// Validate email
if (emailInput.value === '') {
alert('Please enter your email address.');
} else if (!isValidEmail(emailInput.value)) {
alert('Please enter a valid email address.');
} else {
modalbox.style.display = 'block'; // Show the modal
}
});
closebtn.addEventListener('click', function () {
modalbox.style.display = 'none'; // Hide the modal
});
// Close modal when clicking outside of it
modalbox.addEventListener('click', function(event) {
if (event.target === modalbox) {
modalbox.style.display = 'none'; // Hide modal if the background is clicked
}
});
</script>
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<!-- ProgressBar Functionality -->
<script>
window.onscroll = function () {
updateProgressBar();
};
function updateProgressBar() {
const windowScroll = document.body.scrollTop || document.documentElement.scrollTop;
const documentHeight = document.documentElement.scrollHeight - document.documentElement.clientHeight;
const scrollPercent = (windowScroll / documentHeight) * 100;
document.getElementById("progress-bar").style.width = scrollPercent + "%";
}
</script>
<!-- ProgressBar Functionality Ends-->
<script>
AOS.init();
let headerVisible = false;
document.getElementById("menu").addEventListener("click", function () {
if (headerVisible === false) {
document.getElementById("header").style.height = "280px";
headerVisible = true;
}
else {
document.getElementById("header").style.height = "50px";
headerVisible = false;
}
})
</script>
<script>
gsap.from("#header", {
duration: 1.5,
y: -100,
opacity: 0,
ease: "power4.out",
stagger: 1,
});
gsap.from(".nav-link", {
duration: 1,
opacity: 0,
y: 20,
delay: 0.5,
stagger: 0.2,
ease: "power3.out"
});
gsap.from("h1", {
duration: 1,
opacity: 0,
y: 50,
delay: 0.7,
stagger: 0.2,
ease: "power3.out"
});
gsap.from("p", {
duration: 1.5,
opacity: 0,
y: 30,
delay: 0.9,
stagger: 0.3,
ease: "power2.out"
});
gsap.from(".btn", {
duration: 1,
scale: 0.8,
opacity: 0,
delay: 1.2,
ease: "back.out(1.7)",
stagger: 0.2
});
gsap.from("img", {
duration: 1.5,
opacity: 0,
scale: 0.9,
delay: 1.5,
stagger: 0.3,
ease: "elastic.out(1, 0.3)"
});
gsap.from(".overlay", {
duration: 1,
opacity: 0,
y: 50,
delay: 1.7,
stagger: 0.3,
ease: "power3.out"
});
gsap.from(".footer-section", {
scrollTrigger: ".footer",
duration: 1.5,
opacity: 0,
y: 50,
ease: "power2.out",
stagger: 0.3,
});
gsap.from(".socials i", {
scrollTrigger: ".footer",
duration: 1,
opacity: 0,
scale: 0.5,
ease: "bounce.out",
stagger: 0.2,
delay: 0.5
});
</script>
<script>const tabs = document.querySelectorAll('.tab');
const cursor = document.getElementById('cursor');
tabs.forEach(tab => {
tab.addEventListener('mouseenter', () => {
cursor.style.width = `${tab.offsetWidth}px`; // Set width to the current tab's width
cursor.style.left = `${tab.offsetLeft}px`; // Move cursor to the current tab's position
cursor.style.opacity = 1;
});
tab.addEventListener('mouseleave', () => {
cursor.style.opacity = 0;
});
});
</script>
<a class="gotopbtn" href="#"><i class="fas fa-arrow-up"></i></a>
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init();
(function() {
let headerVisible = false;
document.getElementById("menu").addEventListener("click", function () {
if (headerVisible === false) {
document.getElementById("header").style.height = "290px";
headerVisible = true;
} else {
document.getElementById("header").style.height = "50px";
headerVisible = false;
}
});
// Show "Go to Top" button after scrolling down
const goTopBtn = document.querySelector(".gotopbtn");
window.addEventListener("scroll", function () {
if (window.scrollY > 200) { // Show the button after scrolling down 200px
goTopBtn.style.display = "block";
} else {
goTopBtn.style.display = "none";
}
});
})(); // IIFE to avoid polluting global scope
</script>
<script src="./script/popup.js"></script>
</body>
</html>