-
Notifications
You must be signed in to change notification settings - Fork 207
/
about.html
916 lines (803 loc) · 25.1 KB
/
about.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
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>About Us - TrendTrove</title>
<link rel="stylesheet" href="preloaderStyle.css">
<link rel="stylesheet" href="style.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" href="styles.css">
<link rel="stylesheet" herf="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<!-- Link to your common CSS file -->
<style>
/* General Styles */
html,
body {
margin: 0;
padding: 0;
height: 100%;
font-family: Arial, sans-serif;
}
body {
background-color: #f7f7f7;
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 100vh;
}
h1,
h2 {
color: #333;
}
/* About Us Section */
.leftabout {
margin-left: 50px;
margin-right: 50px;
margin: 0 auto; /* Center the leftabout content */
padding: 0 50px; /* Adjust horizontal padding */
text-align: center; /* Center all text inside leftabout */
transition: transform 0.3s ease,
}
.leftabout h3 {
justify-content: center;
text-align: center;
}
.leftabout p {
text-align: center;
}
.about-section {
width: 80%;
padding: 40px 0;
margin: 0 auto;
background: #ffffff;
}
.about-title {
font-size: 2.5em;
text-align: center;
margin-bottom: 35px;
}
/* Second part content css */
#div2 {
font-size: 22px;
font-weight: bold;
text-align: center;
margin-bottom: 7px;
}
#div3 {
font-size:25px;
font-weight:900;
text-align: center;
margin-top: 7px;
/* margin-left:40%; */
}
/* First part: Image left, text right */
.about-content-first {
display: flex;
align-items: center; /* Adjusted to center the image and text */
justify-content: space-between;
margin-bottom: 50px;
gap: 30px; /* Added consistent gap between text and image */
}
.about-text {
flex: 1;
font-size: 2em;
line-height: 1.8;
margin-right: 20px; /* Ensure a margin between text and image */
}
.rightabout {
margin-left: 50px;
margin-right: 50px;
}
.about-images img {
width: 500px;
height: 520px;
border-radius: 5%;
aspect-ratio: 3/2;
opacity: 90%;
box-shadow: 0 0 15px 15px rgba(136, 136, 136, 0.5);
}
/* First image on about us page */
.about3 {
margin-right: 50px;
}
/* Second image on about us page */
.about4 {
margin-top: 50px;
margin-left: 25px;
margin-bottom: 20px;
}
.aboutus-body {
font-size: 21px;
}
.slogan {
font-size: 22px;
font-weight: bold;
margin-bottom: 12px;
}
/* Second part: Image right, text left */
.about-content-second {
display: flex;
align-items: center; /* Adjusted to center the image and text */
justify-content: space-between;
flex-direction: row-reverse;
gap: 30px; /* Consistent gap for the second part */
}
.about-container {
padding: 0 40px; /* Increased padding for a more spacious layout */
}
.about-images img {
transition: transform 0.3s ease-in-out; /* Smooth transition */
}
.about-images:hover img {
transform: scale(1.1); /* Scale the image up on hover */
}
/* Footer Section */
/* .footer {
background-color: #bec1c55c;
padding: 20px;
text-align: center;
width: 100%;
}
.footer-section {
margin-bottom: 20px;
}
.footer h1 {
font-size: 1.5em;
margin-bottom: 10px;
}
.footer-list {
list-style: none;
padding: 0;
}
.footer-list li {
margin-bottom: 10px;
}
.footer-list a {
text-decoration: none;
color: #333;
}
.socials a {
margin-right: 10px;
color: #333;
}
.sub input {
padding: 10px;
margin-right: 10px;
width: 70%;
}
.sub .btn {
padding: 10px;
background-color: #333;
color: #fff;
border: none;
cursor: pointer;
}
.sub .btn:hover {
background-color: #555;
}
.about-container {
padding: 0 40px;
}
/* Adding media Queries */
@media (min-width: 1980px) {
.leftabout {
margin-left: 250px;
margin-right: 250px;
}
.about3 {
margin-right: 230px;
}
.about4 {
margin-left: 180px;
}
.rightabout {
margin-left: 250px;
margin-right: 250px;
}
.aboutus-body {
font-size: 25px;
}
#div2 {
font-size: 27px;
}
#div3 {
font-size: 23px;
}
}
@media (max-width: 1200px) {
h3 {
font-size: 20px;
}
.leftabout p {
font-size: 15px;
}
.rightabout p {
font-size: 15px;
}
*/
/* sorry for using id and div2 div3 but something was
getting overwritten and this was easy way out */
#div2 {
font-size: 16px;
}
}
@media (max-width:480px)
{
/* About Us Section */
.leftabout {
margin-left: 5px;
margin-right: 0px;
}
.leftabout h3 {
justify-content: center;
text-align: center;
margin-bottom: 20px;
color: #023047;
/* margin-left: 600px; */
}
.about-section {
width: 100%;
padding:0;
background: #ffffff;
}
.about-title {
margin-top: 70px;
font-size: 2em;
text-align: center;
margin-bottom: 35px;
}
/* Second part content css */
#div2 {
font-size:18px;
font-weight:700;
text-align: center;
color: #023047;
margin-bottom: 50px;
margin-left: -165px;
}
#div3 {
font-size: 19px;
font-weight: bold;
text-align: center;
margin-top:35px;
margin-left: 22px;
margin-right: 22px;
}
/* First part: Image left, text right */
.about-content-first {
margin-bottom: 90px;
gap:0px; /* Added consistent gap between text and image */
}
.about-text {
flex: 1;
font-size: 1em;
line-height: 1;
margin-right: 5px; /* Ensure a margin between text and image */
}
.rightabout {
margin-left:2px;
margin-right:2px;
}
.about-images img {
width: 150px;
height: 170px;
border-radius: 5%;
/* aspect-ratio: 3/2; */
opacity: 90%;
box-shadow: 0 0 15px 15px rgba(136, 136, 136, 0.5);
}
/* First image on about us page */
.about3 {
margin-top: 30px;
margin-right:5px;
}
/* Second image on about us page */
.about4 {
margin-top:80px;
margin-left:5px;
margin-bottom: 20px;
}
.aboutus-body {
font-size:18px;
}
.slogan {
font-size: 22px;
font-weight: bold;
margin-bottom: 12px;
}
/* Second part: Image right, text left */
.about-content-second {
gap:4px;
}
.about-container {
padding: 0px;
}
}
/* Scroll Progress Bar*/
#progress-container {
position: fixed ;
top: 1px;
left: 0;
width: 100%;
height: 15px;
z-index: 99990;
/* background: #f3f3f3; */
}
#progress-bar {
position: fixed;
top: 0.3px;
left: 0;
width: 0%;
height: 6px;
width: 0;
background: linear-gradient(90deg, rgba(27, 27, 27, 0.762) 0%, rgb(61, 61, 61) 50%, rgba(38, 38, 38, 0.679) 100%);
box-shadow: 0 0 4px rgba(255, 244, 221, 0.7), 0 0 10px rgba(255, 255, 255, 0.496);
transition: width 0.09s ease-in-out;
/* border-radius: 10px; */
}
.go-top-btn {
position: fixed;
bottom: 35px;
right: 35px;
cursor: pointer;
border-radius: 50%;
height: 50px;
width: 50px;
background: #000000;
border: none;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.go-top-btn:hover {
background-color: #000000;
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25);
transform: translateY(-2px);
}
body.dark-mode {
background-color: #121212;
color: #080707;
}
.footer-section{
width:500px;
}
</style>
<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>
<div id="progress-container">
<div id="progress-bar"></div>
</div>
<!-- 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" class="active">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 href="#">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>
<li><a href="accessories.html">Accessories</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>
<button class="mode-toggle" id="modeToggle">
<span class="sun-icon glow"><img src="day-mode.png" alt="Light mode"></span>
<span class="moon-icon glow" style="display: none;"><img src="moon.png" alt="Dark mode"></span>
</button>
</li>
<li class="nav-link">
<i class="fa-solid fa-cart-shopping" id='cart-icon'></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"></i>
</li>
</ul>
</nav>
</header>
<!-- About Us Section -->
<section class="about-section">
<h2 class="about-title">About Us</h2>
<div class="about-container">
<!-- First part: Image left, text right -->
<div class="about-content-first">
<div class="about-text">
<div class="leftabout">
<h3>Welcome to TrendTrove</h3>
<p class="slogan">Elevate Your Style, Embrace Your Confidence!</p>
<p class="aboutus-body">
Your Ultimate Destination for fashion-forward apparel,
accessories, and lifestyle products. We believe in celebrating
individuality and empowering every customer to express their
unique style with confidence. Whether you're looking for
everyday essentials or statement pieces, we source high-quality,
sustainable, and stylish items to elevate your wardrobe.
</p>
</div>
</div>
<div class="about-images">
<img
class="about3"
src="images/about3.jpg"
alt="Fashion Collection"
/>
</div>
</div>
<!-- Second part: Image right, text left -->
<div class="about-content-second">
<div class="about-text">
<div class="rightabout">
<p class="aboutus-body" id="div2">
Our Mission is to empower individuals
</p>
<p class="aboutus-body">
At the heart of TrendTrove is a passion for style and a
commitment to customer satisfaction. Our mission is to offer a
seamless shopping experience with exceptional service, fast
shipping, and an easy return process. We stay ahead of the
fashion curve so you can step out feeling your best, whatever
the occasion.
</p>
</div>
</div>
<div class="about-images">
<img
class="about4"
src="images/about4.jpg"
alt="Accessories Collection"
/>
</div>
</div>
<p class="aboutus-body" id="div3">
Discover your style with TrendTrove — where fashion meets
confidence!
</p>
</div>
</section>
</header>
<!-- Footer -->
<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 quick-links">
<h1>Quick Links</h1>
<ul class=" footer-list ">
<li><a href="about.html"><i class="fas fa-info-circle"></i> About Us</a></li>
<li><a href="terms-conditions.html"><i class="fas fa-file-contract"></i> Terms & Conditions</a></li>
<li><a href="return-policy.html"><i class="fas fa-undo-alt"></i> Return Policy</a></li>
<li><a href="https://github.com/Tejashri-Taral/TrendTrove-Ecommerce" target="_blank"><i class="fab fa-github"></i> Star Us</a></li>
<li><a href="contact.html"><i class="fas fa-envelope"></i> 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 src="preloader.js"></script>
<script>
document.getElementById("cart-icon").addEventListener("click", function() {
window.location.href = "cart.html";
});
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>
<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 > 300) { // Show the button after scrolling down 200px
goTopBtn.style.display = "block";
} else {
goTopBtn.style.display = "none";
}
});
</script>
<button id="scrollToTopBtn" class="scroll-top" aria-label="Scroll to top">
<div class="scroll-top-icon">
<i class="fa-solid fa-arrow-up"></i>
</div>
<svg class="progress-ring" width="60" height="60">
<circle class="progress-ring__circle" stroke="#ffffff" stroke-width="4" fill="transparent" r="28" cx="30"
cy="30"></circle>
</svg>
</button>
<style>
.scroll-top {
position: fixed;
right: 1.6%;
background: linear-gradient(100deg, #1ca6f0, #3c7aff, #05deff);
color: white;
width: 60px;
height: 60px;
border-radius: 50%;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
box-shadow: 0 5px 15px rgba(255, 69, 159, 0.4);
overflow: visible;
z-index: 10;
bottom: 15px;
/* Ensure button is on top */
}
.scroll-top.show {
opacity: 1;
visibility: visible;
}
.scroll-top:hover {
transform: scale(1.1);
/* Subtle scaling instead of expanding */
box-shadow: 0 8px 20px rgba(255, 69, 159, 0.6);
/* Slightly larger shadow */
}
.scroll-top:active {
transform: scale(1.05);
/* Minor scale reduction on click */
}
.scroll-top-icon {
position: relative;
z-index: 2;
transition: transform 0.3s ease;
}
.scroll-top:hover .scroll-top-icon {
transform: translateY(-3px);
}
/* Progress Ring Styling */
.progress-ring {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: rotate(-90deg);
/* To start from the top */
}
.progress-ring__circle {
transition: stroke-dashoffset 0.35s;
transform-origin: 50% 50%;
}
/* Pulse Animation */
@keyframes pulse {
0% {
box-shadow: 0 5px 15px rgba(255, 69, 159, 0.4);
}
50% {
box-shadow: 0 5px 15px rgba(255, 69, 159, 0.7);
}
100% {
box-shadow: 0 5px 15px rgba(255, 69, 159, 0.4);
}
}
.scroll-top:hover {
animation: pulse 1.5s infinite;
}
.scroll-top.show {
animation: none;
/* No animation when showing the button */
}
.scroll-top.show:hover {
animation: pulse 1.5s infinite;
/* Pulse on hover */
}
@media (max-width: 768px) {
.about-content-first {
display: flex;
flex-direction: column-reverse;
gap: 20px;
margin-bottom: 0;
}
.about-content-second {
display: flex;
flex-direction: column-reverse;
gap: 20px;
text-align: center;
}
#div2{
margin-left: 0;
margin-bottom: 12px;
}
#div3{
margin-bottom: 15px;
}
.about-images img {
height: 320px;
width: 320px;
}
}
</style>
<script>
// Get the button
const scrollToTopBtn = document.getElementById("scrollToTopBtn");
const progressCircle = document.querySelector(".progress-ring__circle");
const radius = progressCircle.r.baseVal.value;
const circumference = 2 * Math.PI * radius;
// Set the circle progress properties
progressCircle.style.strokeDasharray = `${circumference} ${circumference}`;
progressCircle.style.strokeDashoffset = circumference;
// Function to show or hide the button based on scroll position
function toggleScrollButton() {
if (window.scrollY > 100) {
scrollToTopBtn.classList.add("show");
} else {
scrollToTopBtn.classList.remove("show");
}
}
// Function to set the scroll progress on the button ring
function setProgress(percent) {
const offset = circumference - (percent / 100) * circumference;
progressCircle.style.strokeDashoffset = offset;
}
// Listen for scroll events to update button visibility and progress
window.addEventListener("scroll", () => {
toggleScrollButton();
const scrollPercent = (window.scrollY / (document.documentElement.scrollHeight - window.innerHeight)) * 100;
setProgress(scrollPercent);
});
// Smooth scroll to top when the button is clicked
scrollToTopBtn.addEventListener("click", () => {
window.scrollTo({
top: 0,
behavior: "smooth"
});
});
</script>
</body>
</html>