-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
701 lines (582 loc) · 29.8 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
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Magna</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lexend:[email protected]&display=swap" rel="stylesheet">
<!-- CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> -->
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
<link rel="manifest" href="manifest.json">
<script>
//if browser support service worker
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
};
</script>
</head>
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="fixed-top">
<div class="container d-flex align-items-center justify-content-between">
<h1 class="logo"><a href="index.html">Magna</a></h1>
<!-- Uncomment below if you prefer to use an image logo -->
<!-- <a href="index.html" class="logo"><img src="assets/img/logo.png" alt="" class="img-fluid"></a>-->
<nav id="navbar" class="navbar">
<ul>
<li><a title="Hero" class="nav-link scrollto active" href="#hero"><i style="font-size: 25px;"
class="bi bi-house-door-fill"></i></a></li>
<li><a name="About" title="About" class="nav-link scrollto" href="#about"><i style="font-size: 25px;"
class="bi bi-info-circle-fill"></i></a></li>
<li><a title="Services" class="nav-link scrollto" href="#services"><i style="font-size: 25px;" class="bi bi-gear-fill"></i>
</a></li>
<li><a title="Team" class="nav-link scrollto" href="#team"><i style="font-size: 25px;" class="bi bi-people-fill"></i> </a>
</li>
<li><a title="Contact" class="nav-link scrollto" href="#contact"><i style="font-size: 25px;" class="bi bi-envelope-fill"></i>
</a></li>
<li id="loginButton" class="logged-out" style="display: none;" data-bs-toggle="modal"
data-bs-target="#login-modal"><a class="nav-link scrollto" href="#login"><i style="font-size: 25px;"
class="bi bi-box-arrow-in-right"></i> </a></li>
<li class="logged-out" style="display: none;" data-bs-toggle="modal" data-bs-target="#signup-modal"><a
class="nav-link scrollto" href="#signup"><i style="font-size: 25px;" class="bi bi-person-plus-fill"></i>
</a></li>
<li class="logged-in" style="display: none;"><a id="logout" class="nav-link scrollto" href="#"><i
style="font-size: 25px;" class="bi bi-box-arrow-right"></i></a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->
</div>
</header><!-- End Header -->
<!-- ======= Hero Section ======= -->
<section id="hero" class="d-flex align-items-center">
<div class="container">
<div class="row">
<div class="col-lg-6 pt-5 pt-lg-0 order-2 order-lg-1 d-flex flex-column justify-content-center">
<h1 onclick="speakText('Shopping with Ease and Elegance')">Shopping with Ease and Elegance</h1>
<h2 class="font-size-element"
onclick="speakText('We are team of Web Designers making website convenient for the Dyslexic')">We are a team
of Web Designers making website convenient for the Dyslexics</h2>
<div class="d-flex">
<a style="cursor: pointer;" onclick="routeToProductPage()" class="btn-get-started scrollto">Start
Shopping</a>
<!-- <a href="https://youtu.be/nT20JV1nRZg?si=N98zvLlEozdSO43e" class="glightbox btn-watch-video"><i class="bi bi-play-circle"></i><span>Watch Video</span></a> -->
</div>
</div>
<div class="col-lg-6 order-1 order-lg-2 hero-img">
<img style="margin-top: 40px;" src="assets/img/hero-img.jpg" class="img-fluid animated" alt="">
</div>
</div>
</div>
<script>
function routeToProductPage() {
auth.onAuthStateChanged(user => {
if (user) {
window.location.href = "inner-page.html";
} else {
alert('Please Login');
setupUI();
}
})
}
</script>
</section><!-- End Hero -->
<main id="main">
<!-- ======= Featured Services Section ======= -->
<section id="featured-services" class="featured-services">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-6">
<div class="icon-box">
<div class="icon"><i class="bi bi-arrows-angle-expand"></i></div>
<h4 class="title font-size-element"><a href="">Change Font Size</a></h4>
<button onpointermove="speakText('increase text size')" id="incSizeBtn"
class="btn-font-change sizebuttons" onclick="increaseFontSize()">Increase Text Size</button>
<button onpointermove="speakText('decrease text size')" id="decSizeBtn"
class="btn-font-change sizebuttons" onclick="decreaseFontSize()">Decrease Text Size</button>
<p style="line-height: 30px;" class="description font-size-element">Increase or decrease the size of the
textual content of this webpage for better user reading experience.
</div>
</div>
<div class="col-lg-4 col-md-6 mt-4 mt-md-0">
<div class="icon-box">
<div class="icon"><i class="bi bi-card-checklist"></i></div>
<h4 class="title font-size-element"><a href="">Change Font Style</a></h4>
<button onpointermove="speakText('change font style')" class="btn-font-change sizebuttons"
onclick="changeFontStyle()">Change Font Style</button>
<p class="description font-size-element">Change the font style of this webpage by clicking the above
button. so that users can be comfortable with their own font selection</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mt-4 mt-lg-0">
<div class="icon-box">
<div class="icon"><i class="bi bi-mic"></i></div>
<h4 class="title font-size-element"><a href="">Annyang Settings</a></h4>
<button onclick="annyang.start();speakText('Your are now in listening mode')" id="incSizeBtn" class="btn-font-change sizebuttons">Start Listening</button>
<button onclick="annyang.abort();speakText('Your are now in sleep mode')" id="decSizeBtn"class="btn-font-change sizebuttons">Stop Listening</button>
<p onclick="speakText('You can set the website in listening mode or sleep mode')" class="description font-size-element"> You can set the website in listening mode or sleep mode</p>
</div>
</div>
</div>
</div>
</section><!-- End Featured Services Section -->
<!-- ======= About Section ======= -->
<section id="about" class="about">
<div class="container">
<div class="section-title">
<span>About us</span>
<h2>About us</h2>
</div>
<div class="row">
<div class="col-lg-6">
<img src="assets/img/about2.jpg" class="img-fluid" alt="">
</div>
<div class="col-lg-6 pt-4 pt-lg-0 content">
<ul>
<li class="font-size-element"
onclick="speakText('Welcome to Magna, where inclusivity reigns. We prioritize dyslexic users with simplified language, customizable fonts, and clear navigation.')">
<i class="bi bi-check-circle"></i> Welcome to Magna, where inclusivity reigns. We prioritize dyslexic
users with simplified language, customizable fonts, and clear navigation. </li>
<li class="font-size-element"
onclick="speakText('Our platform fosters accessibility, setting new online shopping standards. We recognize dyslexic challenges and aim to support users with tailored features, ensuring everyone can shop with ease.')">
<i class="bi bi-check-circle"></i>Our platform fosters accessibility, setting new online shopping
standards. We recognize dyslexia's challenges and aim to support users with tailored features, ensuring
everyone can shop with ease. </li>
<li class="font-size-element"
onclick="speakText('From intuitive design to thoughtful features, we celebrate diversity and empower all customers to navigate our platform effortlessly.')">
<i class="bi bi-check-circle"></i>From intuitive design to thoughtful features, we celebrate diversity
and empower all customers to navigate our platform effortlessly.</li>
<li class="font-size-element"
onclick="speakText('At Magna, we are committed to creating a welcoming environment where everyone feels supported and included, revolutionizing the online shopping experience for individuals with dyslexia.')">
At Magna, we're committed to creating a welcoming environment where everyone feels supported and
included, revolutionizing the online shopping experience for individuals with dyslexia.</li>
</ul>
</div>
</div>
</div>
<!-- ======= Services Section ======= -->
<section id="services" class="services section-bg">
<div class="container">
<div class="section-title">
<span>Services</span>
<h2>Services</h2>
<p>Explore the range of services our website offers.</p>
</div>
<div class="row">
<div class="col-lg-4 col-md-6 d-flex align-items-stretch">
<div class="icon-box">
<div class="icon"><i class="bx bx-navigation"></i></div>
<h4><a href="">Site Navigation</a></h4>
<p class="font-size-element">Voice navigation for smoothly navigating through different sections of the
website without having to use the keyboard.</p>
</div>
</div>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4 mt-md-0">
<div class="icon-box">
<div class="icon"><i class="bx bx-pencil"></i></div>
<h4><a style="cursor: pointer;"
onclick="speakText('Option to increase and decrease the font size based on the users preference. A suitably colour-contrasted layout to enhance readability for individuals with dyslexia.')">Font
Customization</a></h4>
<p class="font-size-element">Option to increase and decrease the font size based on the user's preference.
A suitably colour-contrasted layout to enhance readability for individuals with dyslexia.</p>
</div>
</div>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4 mt-lg-0">
<div class="icon-box">
<div class="icon"><i class="bx bx-cart"></i></div>
<h4><a href="">Shopping Cart</a></h4>
<p class="font-size-element">Product added to the cart by a specific user is only shown to that user
alone. Can add, remove products from cart and proceed to buy from cart.</p>
</div>
</div>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4">
<div class="icon-box">
<div class="icon"><i class="bx bx-station"></i></div>
<h4><a href="">Voice Assistance</a></h4>
<p class="font-size-element">Voice-activated commands for easy navigation to different sections of the
website.
.
</p>
</div>
</div>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4">
<div class="icon-box">
<div class="icon"><i class="bx bx-user"></i></div>
<h4><a href="">User Privacy</a></h4>
<p class="font-size-element">Necessary measures are in place using firebase to ensure the protection of
user privacy.</p>
</div>
</div>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4">
<div class="icon-box">
<div class="icon"><i class="bx bx-layout"></i></div>
<h4><a href="">Text to Speech Interface</a></h4>
<p class="font-size-element">Clicking on the textual content enables voice assistance, allowing the
content to be read out loud for your convenience.
</p>
</div>
</div>
</div>
</div>
</section><!-- End Services Section -->
<!-- ======= Team Section ======= -->
<section id="team" class="team section-bg">
<div class="container">
<div class="section-title">
<span>Team</span>
<h2>Team</h2>
<p class="font-size-element">Presenting to you, in all their glory, the incredible members of our exceptional
team!</p>
</div>
<div class="row">
<div class="col-lg-3 col-md-6 d-flex align-items-stretch">
<div class="member">
<img src="assets/img/team/team-1.jpg" alt="">
<h4>Avin Madhu</h4>
<div class="social">
<a href="https://mailto:[email protected]"><i class="bi bi-envelope-fill"></i></a>
<a href="https://github.com/avin-madhu"><i class="bi bi-github"></i></a>
<path
d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951" />
</svg></a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 d-flex align-items-stretch">
<div class="member">
<img src="assets/img/team/team-2.jpg" alt="">
<h4>Amala Gopinath</h4>
<div class="social">
<a href="https://mailto:[email protected]"><i class="bi bi-envelope-fill"></i></a>
<a href="https://github.com/Amala-Gopinath"><i class="bi bi-github"></i></a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 d-flex align-items-stretch">
<div class="member">
<img src="assets/img/team/team-3.jpg" alt="">
<h4>Nadim Naisam</h4>
<div class="social">
<a href="https://mailto:[email protected]"><i class="bi bi-envelope-fill"></i></a>
<a href="https://github.com/NadimNaisam"><i class="bi bi-github"></i></a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 d-flex align-items-stretch">
<div class="member">
<img src="assets/img/team/team-4.jpg" alt="">
<h4>Gopika Chandran A J</h4>
<div class="social">
<a href="https://mailto:[email protected]"><i class="bi bi-envelope-fill"></i></a>
<a href="https://github.com/GopikaChandranAJ"><i class="bi bi-github"></i></a>
</div>
</div>
</div>
</div>
</div>
</section><!-- End Team Section -->
<!-- ======= Contact Section ======= -->
<section id="contact" class="contact">
<div class="container">
<div class="section-title">
<span>Contact</span>
<h2>Contact</h2>
<p class="font-size-element">For any queries, mail us !!</p>
</div>
<div class="row">
<div class="col-lg-5 d-flex align-items-stretch">
<div class="info">
<div class="address">
<i class="bi bi-geo-alt"></i>
<h4>Location:</h4>
<p class="font-size-element">College of Engineering, Chengannur</p>
</div>
<div class="email">
<i class="bi bi-envelope"></i>
<h4>Email:</h4>
<p class="font-size-element">[email protected]</p>
</div>
<div class="phone">
<i class="bi bi-phone"></i>
<h4>Call:</h4>
<p class="font-size-element">+91 7902467901</p>
</div>
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3937.1798691608765!2d76.61490531107472!3d9.31732529071744!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3b0622ea027eb08f%3A0x41105b207db821c6!2sCollege%20of%20Engineering%20Chengannur!5e0!3m2!1sen!2sin!4v1713006756272!5m2!1sen!2sin"
frameborder="0" style="border:0; width: 100%; height: 290px;" allowfullscreen></iframe>
</div>
</div>
<div class="col-lg-7 mt-5 mt-lg-0 d-flex align-items-stretch">
<form method="post" role="form" class="php-email-form">
<div class="row">
<div class="form-group col-md-6">
<label for="name">Your Name</label>
<input type="text" name="name" class="form-control" id="name" required>
</div>
<div class="form-group col-md-6 mt-3 mt-md-0">
<label for="name">Your Email</label>
<input type="email" class="form-control" name="email" id="email" required>
</div>
</div>
<div class="form-group mt-3">
<label for="name">Subject</label>
<input type="text" class="form-control" name="subject" id="subject" required>
</div>
<div class="form-group mt-3">
<label for="name">Message</label>
<textarea class="form-control" name="message" rows="10" required></textarea>
</div>
<div class="my-3">
<div class="loading">Loading</div>
<div class="error-message"></div>
<div class="sent-message">Your message has been sent. Thank you!</div>
</div>
<div class="text-center"><button type="submit">Send Message</button></div>
</form>
</div>
</div>
</div>
</section><!-- End Contact Section -->
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer">
<div class="footer-top">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-6">
<h3>Magna</h3>
<p class="font-size-element">We aim to provide a better shopping experience for people with dyslexic trait
and expand the shopping community.</p>
</div>
</div>
<div style="padding: 20px;" class="social-links">
<a onpointermove="speakText('visit our twitter account')" href="#" class="twitter"><i
class="bx bxl-twitter"></i></a>
<a onpointermove="speakText('visit our facebook account')" href="#" class="facebook"><i
class="bx bxl-facebook"></i></a>
<a onpointermove="speakText('visit our instagram account')" href="#" class="instagram"><i
class="bx bxl-instagram"></i></a>
<a onpointermove="speakText('visit our linkedin account')" href="#" class="linkedin"><i
class="bx bxl-linkedin"></i></a>
</div>
</div>
</div>
<div class="container footer-bottom clearfix">
<div class="copyright">
© Copyright <strong><span>Magna</span></strong>. All Rights Reserved
</div>
<div class="credits">
Designed by <a href="#">Team 8</a>
</div>
</div>
</footer><!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i
class="bi bi-arrow-up-short"></i></a>
<!-- Login Modal -->
<div class="modal fade" id="login-modal" tabindex="-1" aria-labelledby="modal-title" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="login-modal-title">Shopping made Easy!</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="login-form" class="text-center" class="form-signin">
<img class="mb-4" src="assets/img/apple-touch-icon.png" alt="" width="170" height="170">
<h1 class="h3 mb-3 font-weight-normal">Login</h1>
<br>
<input type="email" id="login-email" class="form-control" placeholder="Email address" required autofocus>
<input type="password" id="login-password" class="form-control" placeholder="Password" required>
<div class="checkbox mb-3">
<br>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>
<button id="google-auth-login" class="btn btn-lg btn-danger btn-block" type="button"><i
class="bi bi-google"></i>Login with Google</button>
<p class="mt-5 mb-3 text-muted">© Team 8</p>
</form>
</div>
</div>
</div>
</div>
<!-- Sign Up Modal -->
<div class="modal fade" id="signup-modal" tabindex="-1" aria-labelledby="modal-title" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="signup-modal-title">Shopping made Easy!</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="signup-form" class="text-center" class="form-signin">
<img class="mb-4" src="assets/img/favicon.png" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Sign Up</h1>
<br>
<input type="email" id="signup-email" class="form-control" placeholder="Email address" required autofocus>
<input type="password" id="signup-password" class="form-control" placeholder="Password" required>
<div class="checkbox mb-3">
<br>
<label>
<input style="left: 0%;" type="checkbox" value="remember-me"> Remember me
</label>
<br>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign Up</button>
<button id="google-auth" class="btn btn-lg btn-danger btn-block"><i class="bi bi-google"></i>Sign in With
Google</button>
<br>
<p style="margin-top: 10px;">Already Have an Account? <a href="#login" data-bs-target="#login-modal"
data-bs-toggle="modal">Login</a></p>
<p class="mt-5 mb-3 text-muted">© Team 8</p>
</form>
</div>
</div>
</div>
</div>
<script>
let count = 0;
const incSizeBtn = document.getElementById("incSizeBtn");
const decSizeBtn = document.getElementById("decSizeBtn");
fontArray = ['Arial, sans-serif', 'Courier New, monospace', '"Lexend", sans-serif']
var FontStyleElement = document.querySelectorAll('body');
var i = 0;
var currentfont = "";
function changeFontStyle() {
FontStyleElement.forEach(function (element) {
if (currentfont)
{
currentfont = window.localStorage.getItem("newFontFam");
}
else
{
currentfont = parseFloat(window.getComputedStyle(element, null).getPropertyValue('font-family'));
window.localStorage.setItem("newFontFam", currentfont);
}
var newFont = fontArray[i];
i = (i + 1) % fontArray.length;
window.localStorage.setItem("newFontFam", newFont)
element.style.fontFamily = window.localStorage.getItem("newFontFam");
});
}
var FontSizeElements = document.querySelectorAll('.font-size-element');
function increaseFontSize() {
decSizeBtn.disabled = false;
if (count == 4) {
incSizeBtn.disabled = true;
}
count++;
FontSizeElements.forEach(function (element) {
var currentSize = parseFloat(window.getComputedStyle(element, null).getPropertyValue('font-size'));
var newSize = currentSize + 5; // You can adjust the value as needed
localStorage.setItem("fontSize", newSize + "px");
element.style.fontSize = newSize + 'px';
element.style.lineHeight = newSize + 'px';
});
}
function decreaseFontSize() {
incSizeBtn.disabled = false;
if (count == 1) {
decSizeBtn.disabled = true;
}
count--;
FontSizeElements.forEach(function (element) {
var currentSize = parseFloat(window.getComputedStyle(element, null).getPropertyValue('font-size'));
var newSize = currentSize - 5; // You can adjust the value as needed
localStorage.setItem("fontSize", newSize + "px");
element.style.fontSize = newSize + 'px';
element.style.lineHeight = newSize + 'px';
});
}
// Text To Speech On Hover
function speakText(text) {
const selectedVoice = getSpecificVoice(); // Change this function to match the desired voice
if (selectedVoice) {
const utterance = new SpeechSynthesisUtterance(text);
utterance.voice = selectedVoice;
speechSynthesis.cancel(); // Stop any ongoing speech
speechSynthesis.speak(utterance);
utterance.onend = function () {
// Speech has ended
console.log('Speech ended');
};
}
}
function getSpecificVoice() {
// Replace 'Microsoft David Desktop - English (United States)' with the desired voice name
const voiceName = 'Google UK English Female';
const voices = speechSynthesis.getVoices();
return voices.find(voice => voice.name === voiceName);
}
let savedSize = localStorage.getItem("fontSize");
// console.log(savedSize)
if (savedSize) {
FontSizeElements.forEach(function (element) {
element.style.fontSize = savedSize;
element.style.lineHeight = savedSize;
});
}
</script>
<!-- FireBase Configuration Scripts -->
<script src="https://www.gstatic.com/firebasejs/5.6.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.6.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.6.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.6.0/firebase-functions.js"></script>
<script>
const firebaseConfig = {
apiKey: "AIzaSyAbzDGgeZCaiq-dmWQNqnpq_yi6KLyn_Q0",
authDomain: "miniproject-740e2.firebaseapp.com",
projectId: "miniproject-740e2",
storageBucket: "miniproject-740e2.appspot.com",
messagingSenderId: "493659960891",
appId: "1:493659960891:web:d8908059f91a37a6bc8e1e",
measurementId: "G-49BHFJDWQD"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const auth = firebase.auth();
const provider = new firebase.auth.GoogleAuthProvider();
const loginBtn = document.getElementById("google-auth");
const signupBtn = document.getElementById("google-auth-login")
function userSignIn() {
auth.signInWithPopup(provider)
.then((result) => {
const user = result.user;
console.log(user);
})
.catch((error) => {
console.error(error.message);
});
}
loginBtn.addEventListener('click', userSignIn);
signupBtn.addEventListener('click', userSignIn);
</script>
<!-- VendorJS Files -->
<script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>
<script src="assets/js/annyang.js"></script>
<script type="module" src="assets/js/auth.js"></script>
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>