-
Notifications
You must be signed in to change notification settings - Fork 276
/
team.html
847 lines (734 loc) · 28.8 KB
/
team.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Team</title>
<link rel="stylesheet" href="preloaderStyle.css">
<link rel="stylesheet" href="src/css/index.css">
<link rel="stylesheet" href="src/css/navbar.css">
<link rel="shortcut icon" href="ambulance.png" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<div class="gtranslate_wrapper"></div>
<script>window.gtranslateSettings = { "default_language": "en", "detect_browser_language": true, "wrapper_selector": ".gtranslate_wrapper" }</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>
<!--Updated to latest version-->
<style>
/* Font size and padding of buttons */
.buttons .login,
.buttons .get-started,
.dark-mode-toggle {
font-size: 18px;
padding: 10px 30px;
transition: background-color 0.3s ease, transform 0.3s ease;
}
/* Container spacing from the top */
.buttons {
margin-top: 20px;
display: flex;
gap: 30px;
}
/* Login button styling */
.login {
background-color: blue;
color: white;
border: none;
border-radius: 5px;
padding: 10px 50px;
text-decoration: none;
}
/* Get Started button styling */
.get-started {
background-color: blue;
color: white;
border: none;
border-radius: 5px;
padding: 10px 50px;
text-decoration: none;
}
/* Login button hover effect */
.login:hover {
background-color: darkblue;
transform: scale(1.05);
}
/* Get Started button hover effect */
.get-started:hover {
background-color: darkblue; /* Darker shade for hover effect */
transform: scale(1.05); /* Slightly enlarge the button */
}
/* font size of button */
.buttons .login,
.buttons .get-started,
.dark-mode-toggle {
font-size: 18px;
/* Increase font size */
padding: 10px 15px;
/* Adjust padding for better appearance */
}
/* more addition for dark mode theme */
.dark-mode .logo img {
filter: brightness(0) invert(1); /* Inverts the color to make it white */
}
.navbar.dark-mode .logo-img {
filter: brightness(0) invert(1); /* Change logo color in dark mode */
}
/* .menu ul {
list-style-type: none;
padding: 0;
display: flex;
}
.menu a {
color: black;
Light mode link color
border: 1px solid black;
Black border
padding: 5px 10px;
text-decoration: none;
transition: all 0.3s;
}
.menu a:hover {
background-color: blue;
Blue background on hover
color: white;
White text on hover
}
.dark-mode .menu a {
color: white;
Dark mode link color
border: 1px solid lightgrey;
Light grey border in dark mode
} */
.dark-mode {
background-color: rgba(50, 50, 50, 0.95);
/* Slightly gray background with high opacity */
}
.dark-mode .menu a:hover {
background-color: white;
/* White background on hover in dark mode */
color: black;
/* Black text on hover in dark mode */
}
/* end */
/* adding dark mode for contact info */
.content {
transition: background-color 0.3s, color 0.3s;
/* Smooth transitions */
}
.dark-mode .content {
background-color: rgba(50, 50, 50, 0.95);
/* Match body background opacity */
padding: 20px;
/* Optional: add padding for better spacing */
}
/* end */
/*
.menu ul li a {
padding: 10px 15px;
color: black;
text-decoration: none;
border-radius:7px;
border:1.5px solid black;
}
.menu ul li a.active {
color: white;
background-color: #000;
} */
.content {
margin: 20px;
padding: 20px;
background-color: #fff;
border-radius: 5px;
flex-grow: 1;
}
h1 {
color: blue;
text-align: center;
margin-bottom: 20px;
}
/* .contact-feature {
display: flex;
justify-content: center;
align-items: center;
margin: 70px auto 70px auto;
max-width: 800px;
width: 100%;
gap:40px;
}
.contact-feature img {
width: 150px;
height: auto;
margin-right: 20px;
border-radius: 10px;
} */
footer {
background-color: #000;
color: white;
text-align: center;
padding: 10px 0;
position: relative;
bottom: 0;
width: 100%;
}
/* Added the hover animation on the footer social icons */
.social-icon {
transition: transform 0.3s ease;
/* Smooth transition effect */
}
.social-icon:hover {
transform: scale(1.3);
/* Scale the element to 1.3 times its size */
}
.fa-facebook:hover {
color: blue;
/* Icon color change to blue on hover */
}
a .social-icon .twitter:hover {
color: white;
}
.fa-x-twitter:hover {
color: black;
/* Icon color change to black on hover */
}
.fa-instagram:hover {
color: orangered;
/* Icon color change to orangered on hover */
}
.fa-linkedin-in:hover {
color: rgb(16, 13, 195);
/* Icon color change to rgb(16, 13, 195) on hover */
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Logo Animation */
@keyframes logoAnimation {
0% {
opacity: 0;
transform: translateX(-100px);
/* Start from the left */
}
50% {
transform: translateX(10px);
/* Move slightly to the right */
}
100% {
opacity: 1;
transform: translateX(0);
/* End at original position */
}
}
.carousel-container {
width: 100%;
max-width: 300px;
overflow: hidden;
position: relative;
padding: 30px;
margin-left:500px;
}
.carousel {
gap:10px;
display: flex;
transition: transform 0.4s ease-in-out;
z-index: 1;
}
.card {
min-width: 100%;
height:350px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background-color: #e6f2ff;
text-align: center;
padding: 20px;
}
.card img {
width: 80px;
height: 80px;
border-radius: 50%;
margin-bottom: 15px;
}
.card h2 {
font-size: 1.5em;
color: #337ab7;
}
.card p {
font-size: 1em;
color: #333;
}
/* Navigation buttons */
.prev, .next {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 2em;
color: #337ab7;
background: none;
border: none;
cursor: pointer;
padding: 10px;
}
.prev {
left: 0px;
}
.next {
right: 0px;
}
/* Dots indicator */
.dots-container {
text-align: center;
margin-top: 15px;
}
.dot {
height: 12px;
width: 12px;
margin: 0 5px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
cursor: pointer;
transition: background-color 0.3s;
}
.dot.active {
background-color: #337ab7;
}
/* Responsive styles */
@media (max-width: 600px) {
.carousel-container {
padding: 5px;
}
.card {
padding: 15px;
}
.card img {
width: 50px;
height: 50px;
}
.card h2 {
font-size: 1em;
}
.card p {
font-size: 0.8em;
}
.prev, .next {
font-size: 1.5em;
}
.dot {
height: 8px;
width: 8px;
}
}
</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 class="container">
<div class="logo">
<div class="brand-name">
<span class="letter red" style="--letter-index: 1;">A</span>
<span class="letter red" style="--letter-index: 2;">m</span>
<span class="letter red" style="--letter-index: 3;">b</span>
<span class="letter red" style="--letter-index: 4;">u</span>
<span class="letter" style="--letter-index: 5;">F</span>
<span class="letter" style="--letter-index: 6;">l</span>
<span class="letter" style="--letter-index: 7;">o</span>
<span class="letter" style="--letter-index: 8;">w</span>
</div>
<a href="./index.html">
<img src="images/logo2-w.webp" alt="Ambulance Monitoring System Logo"
style="width: 50px; height: auto" />
</a>
</div>
<!-- changing the colour of word login and get started removing the text decoration -->
<div class="buttons">
<a href="login.html" class="login" style="text-decoration:none; color:#2980b9;">Log in</a>
<a href="up.html" class="get-started" style="text-decoration:none; color:#2980b9;">Get started</a>
<button class="light-dark-btn dark-mode-toggle" id="dark-mode-toggle">
<i class="fa-solid fa-moon"></i>
</button>
</div>
<img src="images/logo2-w.webp" alt="Ambulance Monitoring System Logo" style="width: 80px; height: auto" />
</div>
<nav class="menu">
<ul>
<li>
<a href="#container" style="color: #333;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.34314 11.5858L12 5.92893M12 5.92893L17.6568 11.5858M12 5.92893V18.0711"
stroke="currentColor">
</path>
</svg>
</a>
</li>
<li>
<a href="index.html" id="home-link" class="menu_links" data-link="Home">
<span>Home</span>
</a>
</li>
<li>
<a href="features.html" id="features-link" class="menu_links" data-link="Features">
<span>Features</span></a>
</li>
<li>
<a href="team.html" id="team-link" class="menu_links" data-link="Team">
<span>Team</span></a>
</li>
<li>
<a href="contact.html" id="contact-link" class="menu_links" data-link="Contact">
<span>Contact</span></a>
</li>
<li>
<a href="Feedback.html" id="contact-link" class="menu_links" data-link="Feedback">
<span>Feedback</span></a>
</li>
<li>
<a href="nearby.html" id="contact-link" class="menu_links" data-link="Nearby">
<span>Nearby</span></a>
</li>
</ul>
</nav>
</div>
<!--changing the colour of h1 tag to match the theme of page -->
<div class="content" id="main-content">
<h1 style="color: #2980b9;">Meet Our Team</h1>
<div class="carousel-container">
<div class="carousel">
<!-- Card 1: Service Manager -->
<div class="card">
<img src="images/service-web.jpg" alt="Service Manager">
<h2>Service Manager</h2>
<p>Responsible for coordinating ambulance services and ensuring timely responses.</p>
</div>
<!-- Card 2: Rescue Specialist -->
<div class="card">
<img src="images/rescue-web.webp" alt="Rescue Specialist">
<h2>Rescue Specialist</h2>
<p>Trained to provide immediate care and transport patients safely to hospitals.</p>
</div>
<!-- Card 3: Call Operator -->
<div class="card">
<img src="images/call-web.jpg" alt="Call Operator">
<h2>Call Operator</h2>
<p>First point of contact for emergencies, dispatching ambulances efficiently.</p>
</div>
<!-- Card 4: GPS Technician -->
<div class="card">
<img src="images/gps-web.webp" alt="GPS Technician">
<h2>GPS Technician</h2>
<p>Manages real-time tracking systems for effective ambulance navigation.</p>
</div>
</div>
<!-- Navigation buttons -->
<button class="prev" onclick="moveCarousel(-1)">❮</button>
<button class="next" onclick="moveCarousel(1)">❯</button>
<div class="dots-container">
<span class="dot" onclick="goToSlide(0)"></span>
<span class="dot" onclick="goToSlide(1)"></span>
<span class="dot" onclick="goToSlide(2)"></span>
<span class="dot" onclick="goToSlide(3)"></span>
</div>
</div>
</div>
<script>
let currentSlide = 0;
function updateDots() {
const dots = document.querySelectorAll('.dot');
dots.forEach(dot => dot.classList.remove('active'));
dots[currentSlide].classList.add('active');
}
function moveCarousel(direction) {
const carousel = document.querySelector('.carousel');
const totalSlides = document.querySelectorAll('.carousel .card').length;
currentSlide = (currentSlide + direction + totalSlides) % totalSlides;
carousel.style.transform = `translateX(-${currentSlide * 100}%)`;
updateDots();
}
function goToSlide(slideIndex) {
const carousel = document.querySelector('.carousel');
currentSlide = slideIndex;
carousel.style.transform = `translateX(-${currentSlide * 100}%)`;
updateDots();
}
// Initialize the first dot as active
document.addEventListener('DOMContentLoaded', () => {
updateDots();
});
</script>
<!-- Contact Section in Full Row -->
<div class="features-container">
<div class="contact-features">
<div class="inner">
<div class="front">
<!-- removing an unnecessary underline the word "contact us" by setting text-decoration to none of anchor tag -->
<a href="Contactus.html" style="text-decoration: none;">
<img src="images/contact-w.avif" alt="Contact Us" />
<h2>Contact Us</h2>
</a>
</div>
<div class="back">
<p>
Reach out to us for any inquiries or assistance. We're here to
help you 24/7 with our emergency services.
</p>
<a href="contact.html" class="button">Go to Contact</a>
</div>
</div>
</div>
</div>
<footer style="color: #f3f4f6; text-align: center; width: 100%; background-color: #C4D7FF; border: none;">
<div
style="display: flex; justify-content: space-between; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; padding: 20px 0;">
<!-- Quick Links Section -->
<div style="flex: 1; min-width: 200px; margin-bottom: 20px;">
<h3 style="font-size: 1.5rem; margin-bottom: 10px; color: #2980b9;">Quick Links</h3>
<ul style="list-style-type: none; padding: 0;">
<li><a href="about.html" class="footer-link" style="text-decoration: none;" color>About Us</a></li>
<li><a href="contact.html" class="footer-link">Contact Us</a></li>
<li><a href="privacy.html" class="footer-link">Privacy Policy</a></li>
<li><a href="terms.html" class="footer-link">Terms of Service</a></li>
<li><a href="sitemap.html" class="footer-link">Site Map</a></li>
</ul>
</div>
<!-- Contact Information Section -->
<div style="flex: 1; min-width: 200px; margin-bottom: 10px;">
<h3 style="font-size: 1.5rem; color: #2980b9;">Contact Info</h3>
<p style="color: #000;">123 Emergency Lane, Mumbai, India</p>
<a href="mailto:emergency@ambulanceservice.in" class="footer-link">emergency@ambulanceservice.in</a>
<p style="color: #000000;">Phone: <a href="tel:+91-911-1234567" class="footer-link">+91-911-1234567</a>
</p>
</div>
<!-- Modified the looks of the social icons -->
<!-- Social Media Links -->
<div style="text-align: center; min-width: 200px; color: black;">
<h3 style="font-size: 1.5rem; margin-bottom: 10px; color: #2980b9;">Follow Us</h3>
<div style="display: flex; justify-content: center; align-items: center; gap: 15px; height: 50px;">
<a href="https://www.facebook.com" target="_blank" class="social-icon facebook"
style="color: black; text-decoration: none; font-size: 1.5rem;"><i
class="fab fa-facebook"></i></a>
<a href="https://www.twitter.com" target="_blank" class="social-icon twitter"
style="color: black; text-decoration: none; font-size: 1.5rem;"><i
class="fa-brands fa-x-twitter"></i></a>
<a href="https://www.instagram.com" target="_blank" class="social-icon instagram"
style="color: black; text-decoration: none; font-size: 1.5rem;"><i
class="fab fa-instagram"></i></a>
<a href="https://www.linkedin.com" target="_blank" class="social-icon linkedin"
style="color: black; text-decoration: none; font-size: 1.5rem;"><i
class="fab fa-linkedin-in"></i></a>
</div>
</div>
<!-- Newsletter Subscription -->
<div style="flex: 1; min-width: 200px; margin-bottom: 20px;">
<h3 style="font-size: 1.5rem; margin-bottom: 10px; color: #2980b9;">Subscribe to Our Newsletter</h3>
<form action="#">
<i class="fas fa-envelope" style="position: absolute; top: 7.7rem; right: 22.3rem; color: gray; font-size: 13px;"></i>
<input type="email" placeholder="Your Email"
style="padding: 10px; width: 80%; border: none; border-radius: 5px; padding-left: 27px;" required><br><br>
<button type="submit"
style="background-color: #e81a1a; color: white; padding: 10px 20px; border: none; cursor: pointer; border-radius: 5px;">Subscribe</button>
</form>
<div id="subscription-notification" style="display:none; background-color: rgba(212, 237, 218, 0.8); color: #155724; padding: 10px; border-radius: 5px; position: absolute; top: 10px; left: 600px; z-index: 1000; box-shadow: 0 2px 5px rgba(0,0,0,0.3);">
Thank you for subscribing to our newsletter!
</div>
</div>
<script>
document.querySelector("form").addEventListener("submit", function(event) {
event.preventDefault(); // Prevent form from submitting immediately
// Improved Email validation regex to ensure proper domain like "gmail.com"
const emailInput = document.querySelector("input[type='email']");
const emailRegex = /^[^\s@]+@gmail\.com$/;
if (emailRegex.test(emailInput.value)) {
// Show alert notification with green translucent box
const notification = document.getElementById("subscription-notification");
notification.style.display = "block";
// Hide the message after 3 seconds
setTimeout(function() {
notification.style.display = "none";
}, 3000);
// Reset the form
this.reset();
} else {
alert("Please enter a valid Gmail address.");
}
});
</script>
</div>
</footer>
<!-- Copyright Section -->
<div
style="background-color: #C4D7FF; color: #000000; display: flex; justify-content: center; align-items: center; padding: 10px 20px; border-top: 1px solid #a0c0ff;">
<strong>
<p>© 2024 AmbuFlow. All rights reserved.</p>
</strong>
<a href="chatbot.html">
<div class="fixed bottom-0 right-2 chatbot-container">
<button class="chatbot-button group">
<img class="h-20" src="chatbot.gif" alt="chatbot" />
<span class="tooltip-text">
Welcome to AmbuFlow!<br />
How can I help You?
</span>
</button>
</div>
</a>
<button class="light-dark-btn dark-mode-toggle" id="dark-mode-button">
<i class="fa-solid fa-moon"></i>
</button>
<!-- Add this style block in the <head> section or in your CSS file -->
<script src="script.js">
</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: 75px;
/* 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 */
}
</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>
<!-- change some footer styles -->
<style>
.footer-link{
color: #2980b9;
text-decoration: none;
}
.footer-link:hover{
font-size: 18px;
}
</style>
</html>