forked from anuragverma108/SwapReads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
privacynotice.html
725 lines (624 loc) · 26.9 KB
/
privacynotice.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Privacy Notice - SwapReads</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="apple-touch-icon" sizes="180x180" href="./assets/favicon_package_v0.16/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./assets/favicon_package_v0.16/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/favicon_package_v0.16/favicon-16x16.png">
<link rel="manifest" href="./assets/favicon_package_v0.16/site.webmanifest">
<link rel="mask-icon" href="./assets/favicon_package_v0.16/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./assets/css/MenuClick.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
integrity="sha512-Fo3rlrZj/k7ujTnHg4CGR2D7kSs0v4LLanw2qksYuRlEzO+tcaEPQogQ0KaoGN26/zrn20ImR1DfuLWnOo7aBA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<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=Philosopher:wght@400;700&family=Poppins:wght@400;500;600&display=swap"
rel="stylesheet">
<link rel="preload" as="image" href="./assets/images/hero-banner.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdn.jsdelivr.net/gh/studio-freight/[email protected]/bundled/lenis.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/tailwind.min.css" />
<link href="https://fonts.googleapis.com/css?family=Work+Sans:200,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./assets/css/style.css">
<link rel="stylesheet" href="./assets/css/styles.css">
<link rel="stylesheet" href="./assets/css/Available.css">
<script src="./assets/js/rateUsModal.js" defer></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<!-- Swiper CSS -->
<link rel="stylesheet" href="assets/css/swiper-bundle.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="assets/css/test-style.css">
</head>
<script src="https://unpkg.com/scrollreveal"></script>
<style>
.work-sans {
font-family: 'Work Sans', sans-serif;
}
#menu-toggle:checked+#menu {
display: block;
}
.hover\:grow {
transition: all 0.3s;
transform: scale(1);
}
.hover\:grow:hover {
transform: scale(1.02);
}
</style>
<style>
#chaps {
margin-top: 150px;
}
</style>
<style>
/* styles.css */
/* Base styling */
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #ffdcd4;
color: black;
}
.notice {
padding: 2rem;
max-width: 800px;
color:black;
margin: 2rem auto;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
border-radius: 8px;
padding-bottom: 100px;
margin-top: 200px;
backdrop-filter: blur(10px);
background-color: rgba(255, 255, 255, 0.086);
}
@property --gradient-angle {
syntax: "<angle>";
initial-value: 0deg;
inherits: false;
}
.notice::before,
.notice::after {
content: "";
position: absolute;
inset: -0.1rem;
z-index: 2;
background: conic-gradient(
from var(--gradient-angle),
hsl(340, 94%, 40%),
hsl(344, 69%, 53%),
hsl(0, 88%, 86%),
hsl(344, 64%, 52%),
hsl(340, 94%, 43%)
);
border-radius: inherit;
animation: moving 3s linear infinite;
mask: linear-gradient(
to right,
black 0.4%,
transparent 0%,
transparent 99.6%,
black 90%
),
linear-gradient(
to bottom,
black 0.5%,
transparent 0%,
transparent 99.5%,
black 90%
);
}
@keyframes moving {
0% {
--gradient-angle: 0deg;
}
100% {
--gradient-angle: 360deg;
}
}
.main h1 {
text-align: center;
font-size: 30px;
font-weight: 600;
color: hsl(340, 93%, 42%);
margin-bottom: 50px;
margin-top: 10px;
}
.main p {
margin: 10px 2px;
}
.un-list {
list-style-type: none;
/* padding: 0; */
}
.un-list li {
margin: 9px 2px;
padding: 0.5rem;
}
.un-list li a {
color: hsl(340, 93%, 42%);
display: inline;
}
.un-list li a:hover {
color: #e6482e;
}
/* Dark Mode Styles */
.dark-mode .readmore-anim {
font-size: 18px;
letter-spacing: 0;
color: hsl(357, 37%, 62%);
}
.dark-mode .readmore-anim:hover {
color: #e6482e;
letter-spacing: 1px;
transition: ease-in-out;
}
.dark-mode .header.scrolled {
background-color: #232222; /* Change to a darker color when scrolled */
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Add shadow for better visibility */
}
body.dark-mode {
background-color: #121212;
color:#ffffff;
}
body.dark-mode .notice{
color: white;
}
.main a {
color: hsl(340, 93%, 42%);
display: inline;
}
.dark-mode .main a {
color: hsl(340, 87%, 73%);
display: inline;
}
.dark-mode .switch-container {
right: 12px;
top: 10px;
}
.light-mode .switch-container {
right: 12px;
top: 10px;
}
</style>
</head>
<body>
<header class="header header-anim nav-h" data-header>
<div class="container mobile-container-styles" style="padding-left: 0;">
<nav class="navbar nav_activated" data-navbar>
<ul class="navbar-list nav" style="border-radius: 5px;">
<a href="/index.html" onclick="lenis.scrollTo('index.html');" class="logo" style="display:flex; background-color: none;">
<img src="assets/images/final.png" class="logopic" style=" width: 150px;">
</a>
<li class="navbar-item">
<a href="/index.html" onclick="lenis.scrollTo('#home')" style="background-color: none;" class="navbar-link" data-nav-link><i
class="ri-home-fill"></i> Home</a>
</li>
<li class="navbar-item">
<a href="assets/html/about.html" onclick="lenis.scrollTo('#home')" class="navbar-link" data-nav-link><i
class="ri-home-fill"></i>About Us</a>
</li>
<li class="navbar-item">
<a href="/index.html#benefits" onclick="lenis.scrollTo('#benefits')" class="navbar-link" data-nav-link><i
class="ri-bar-chart-fill"></i> Benefits</a>
</li>
<li class="navbar-item">
<a href="/index.html#genre" onclick="lenis.scrollTo('#genre')" class="navbar-link" data-nav-link><i
class="ri-bar-chart-fill"></i> Genre</a>
</li>
<li class="navbar-item">
<a href="/index.html#contact" onclick="lenis.scrollTo('#contact')" class="navbar-link" data-nav-link><i
class="ri-customer-service-2-fill"></i> Contact</a>
</li>
<li class="navbar-item">
<a href="/index.html#faq" onclick="lenis.scrollTo('#faqq')" class="navbar-link" data-nav-link>
<i class="ri-questionnaire-fill"></i>FAQ</a>
</li>
<li class="navbar-item">
<a href="/index.html#rate-us" onclick="openRateUsModal(); return false;" class="navbar-link">Rate Us</a></li>
<li class="navbar-item" id="login-signup-link">
<a href="assets/html/login.html" class="navbar-link">Login/Signup</a>
</li>
<li>
<div class="navbar darkmode" style="top: 15px; right:20px;">
<input type="checkbox" id="switch" class="switch-checkbox">
<label for="switch" class="switch-label">
<div class="switch-button">
<span class="material-icons sun-icon">wb_sunny</span>
<span class="material-icons moon-icon">brightness_2</span>
</div>
</label>
</div>
</li>
<script>
document.addEventListener("DOMContentLoaded", () => {
const savedAvatar = localStorage.getItem("selectedAvatar");
if (savedAvatar) {
document.getElementById("profile-avatar").src = `./assets/images/${savedAvatar}`;
}
});
function menuToggle() {
const toggleMenu = document.querySelector(".menu");
toggleMenu.classList.toggle("active");
}
</script>
</ul>
</nav>
<div id="mobile_View_Menu">
<span id="menu_lines"></span>
</div>
<script>
let menu=document.getElementById('mobile_View_Menu')
let navbar_con=document.querySelector('.navbar')
menu.addEventListener('click',()=>{
if(menu.classList.contains('open_menu')){
menu.classList.remove('open_menu')
navbar_con.classList.add('nav_activated')
}
else{
menu.classList.add('open_menu')
navbar_con.classList.remove('nav_activated')
}
})
</script>
<script src="http://translate.google.com/translate_a/element.js?cb=loadGoogleTranslate"></script>
<script>
function loadGoogleTranslate() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_element');
}
</script>
<script>
window.addEventListener("scroll", onScroll);
</script>
</div>
</header>
<main class="main">
<div class="notice"">
<h1>Privacy Notice</h1>
<p>Welcome to SwapReads. SwapReads is the solution to common challenges faced by book enthusiasts in today's digital age.
We've identified key problems and developed a platform that addresses them efficiently and effectively. </p>
<p style ="font-size : 16px; font-weight: 600;">Here is our Privacy Notice:</p>
<ul class="un-list">
<li>- We collect personal information when you register, buy, or sell books on SwapReads.</li>
<li>- We use this information to provide and improve our services, personalize user experience, and communicate with you.</li>
<li>- We do not share your personal information with third parties without your consent, except to comply with legal obligations, protect our rights, or as part of a business transfer.</li>
<li>- We take reasonable measures to protect your data from unauthorized access, alteration, disclosure, or destruction.</li>
<li>You have the right to access, update, or delete your personal information. Please contact us at <a href="mailto:[email protected]">[email protected]</a> to make such requests.</li>
</ul>
<p>By using our site, you consent to our privacy practices as described in this notice.</p>
<p>We may update this privacy notice from time to time to reflect changes in our practices or legal requirements. We will notify you of any significant changes by posting the new notice on our website.</p>
<p>We use cookies and similar technologies to enhance your experience on our website. You can control cookie settings through your browser.</p>
<p>Our website may contain links to other sites. We are not responsible for the privacy practices or content of those sites. We encourage you to read the privacy policies of any linked sites.</p>
<p>If you have any questions or concerns about our privacy practices, please contact us at <a href="mailto:[email protected]">[email protected].</a></p>
</div>
</main>
<footer>
<div class="foot-top">
<div class="foot-left">
<div class="desc">
<!--google translate-->
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement(
{ pageLanguage: 'en' },
'google_translate_element'
);
}
</script>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?
cb=googleTranslateElementInit">
</script>
<div><a href="#" class="logo">SwapReads</a></div>
<div>
<p style="text-align: justify; " class="description">SwapReads.com is the ultimate destination
for book
lovers
seeking to swap and
discover new literary gems.
Connect with fellow enthusiasts, exchange your favorite reads, and embark on exciting new
adventures in
the
world of literature—all on one convenient platform. Join us and dive into a universe of
endless
possibilities!
</p>
</div>
</div>
</div>
<div class="foot-middle">
<h2>Quick Links</h2>
<div id="quicklinks">
<div>
<ul>
<li class="foot-quick"><a href="#home" onclick="lenis.scrollTo('#home')">Home</a></li>
<li class="foot-quick"><a href="#benefits"
onclick="lenis.scrollTo('#benefits')">Benefits</a></li>
<li class="foot-quick"><a href="#chapters" onclick="lenis.scrollTo('#chapters')">Literary
Realms</a></li>
<li class="foot-quick"><a href="#pricing" onclick="lenis.scrollTo('#pricing')">Pricing</a>
</li>
<li class="foot-quick"><a href="./assets/html/bookrecommend.html"
onclick="lenis.scrollTo('#contact')">Recommended Book</a></li>
</ul>
</div>
<div>
<ul>
<li class="foot-quick"><a href="./assets/html/booklistswap.html"
onclick="lenis.scrollTo('#contact')">Swap
BookList</a></li>
<li class="foot-quick"><a href="./assets/html/freeBooks.html"
onclick="lenis.scrollTo('#contact')">E-Book</a></li>
<li class="foot-quick"><a href="./assets/html/about.html"
onclick="lenis.scrollTo('#contact')">About</a>
</li>
<li class="foot-quick"><a href="#contact" onclick="lenis.scrollTo('#contact')">Contact
Us</a></li>
<li class="foot-quick"><a href="#faqq" onclick="lenis.scrollTo('#faqq')">FAQ</a></li>
</ul>
</div>
</div>
</div>
<div class="social-icons">
<style>
input[type="email"] {
border: 2px solid #ccc;
/* Gray border */
border-radius: 4px;
/* Rounded corners */
padding: 10px;
/* Inner padding */
font-size: 16px;
/* Font size */
}
</style>
<form type="newsletter">
<label for="newsletter-email" class="newsletter-form">Subscribe to our Newsletter</label>
<div class="row-flex">
<!-- Email input -->
<input type="email" id="newsletter-email" name="email" placeholder="E mail address"
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\.com$"
title="Please enter a valid email address that ends with '.com'" required>
<input type="submit" value="Subscribe" name="subscribe" class="subscribe-btn">
</div>
</form>
<div id="confirmationMessage" style="display: none;">Thank you for subscribing!</div>
<div class="icons">
<a href="https://www.discord.com/" target="_blank">
<div class="icon">
<i class="fab fa-discord" title="Discord" style="cursor: pointer;"></i>
</div>
</a>
<a href="https://www.linkedin.com/in/anurag-verma-b91417253/">
<div class="icon">
<i class="fab fa-linkedin" title="linkedin" style="cursor: pointer;"></i>
</div>
</a>
<a href="https://x.com/anuragverma_108">
<div class="icon">
<i class="fab fa-twitter" title="X" style="cursor: pointer;"></i>
</div>
</a>
<a href="#">
<div class="icon">
<i class="fab fa-instagram" title="Instagram" style="cursor: pointer;"></i>
</div>
</a>
<a href="https://www.youtube.com/@anuragbytes" title="YouTube">
<div class="icon">
<i class="fab fa-youtube" style="cursor: pointer; "></i>
</div>
</a>
</div>
<div id="back-to-top-container" onclick="lenis.scrollTo('#home')" class="right">
<div class="circle1">
<svg id="back-to-top" xmlns="http://www.w3.org/2000/svg" width="30" height="30"
fill="currentColor" class="bi bi-arrow-up-circle-fill" viewBox="0 0 16 16">
<path
d="M16 8A8 8 0 1 0 0 8a8 8 0 0 0 16 0m-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707z" />
</svg>
</div>
</div>
</div>
</div>
<div style="text-align: center; align-items: center;">
<p style="text-align: center">
©
<script>document.write(new Date().getFullYear())</script> All Rights Reserved. Made with ❤ by Guardian
Hackers.
</p>
<div class="row-copy">
<a href="copyrightpolicy.html" id="copyrightPolicyLink">Copyright Policy</a> |
<a href="privacynotice.html" id="privacyNoticeLink">Privacy Notice</a>
</div>
</div>
<!--
- custom js link
-->
<script src="./assets/js/script.js" defer></script>
</script>
<!-- Swiper JS -->
<script src="assets/js/swiper-bundle.min.js"></script>
<!-- Custom JavaScript -->
<script src="assets/js/test-script.js"></script>
<!-- <script src="scroll.js"></script> -->
<script>
const navbar = document.querySelector('.navbar'),
NavButton = document.querySelector('.nav-toggle-btn'),
open = document.querySelector('.open'),
close = document.querySelector('.close');
let count = 0
NavButton.addEventListener('click', () => {
if (count === 0) {
navbar.classList.remove('nav_activated')
open.classList.add('close')
close.classList.add('open')
open.classList.remove('open')
close.classList.remove('close')
count++
}
else {
navbar.classList.add('nav_activated')
open.classList.add('open')
close.classList.add('close')
open.classList.remove('close')
close.classList.remove('open')
count = 0
}
})
</script>
<!-- Lenis smooth scrolling -->
<script>
document.addEventListener("scroll", function () {
var scrollPosition = window.scrollY;
// Get the top position of each section on the page
var homeSection = document.getElementById("home").offsetTop;
var benefitsSection = document.getElementById("benefits").offsetTop;
var chaptersSection = document.getElementById("chapters").offsetTop;
var pricingSection = document.getElementById("pricing").offsetTop;
var contactSection = document.getElementById("contact").offsetTop;
// Check which section the user has scrolled to and add the active class accordingly
if (scrollPosition < benefitsSection) {
setActiveLink("home");
} else if (scrollPosition >= benefitsSection && scrollPosition < chaptersSection) {
setActiveLink("benefits");
} else if (scrollPosition >= chaptersSection && scrollPosition < pricingSection) {
setActiveLink("chapters");
} else if (scrollPosition >= pricingSection && scrollPosition < contactSection) {
setActiveLink("pricing");
} else {
setActiveLink("contact");
}
});
function setActiveLink(sectionId) {
// Remove active class from all navbar links
var navbarLinks = document.querySelectorAll(".navbar-link");
navbarLinks.forEach(function (link) {
link.classList.remove("active");
});
// Add active class to the navbar link corresponding to the current section
var activeLink = document.querySelector('a[href="#' + sectionId + '"]');
if (activeLink) {
activeLink.classList.add("active");
}
}
const lenis = new Lenis({
duration: 1.8,
easing: (t) => (t === 1 ? 1 : 1 - Math.pow(2, -10 * t)),
direction: "vertical",
gestureDirection: "vertical",
smooth: true,
smoothTouch: false,
touchMultiplier: 2,
});
function raf(time) {
lenis.raf(time);
requestAnimationFrame(raf);
}
requestAnimationFrame(raf);
// JavaScript function to load more content when user scrolls to bottom
function loadMoreContent() {
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
var windowHeight = window.innerHeight;
var documentHeight = document.documentElement.scrollHeight;
// Check if user has scrolled to the bottom of the page
if (scrollTop + windowHeight >= documentHeight) {
// Make an AJAX request to fetch more content
// Replace 'more-content-url' with the actual URL to fetch more content
fetch('/index.html')
.then(response => response.text())
.then(data => {
// Append the fetched content to the page
document.getElementById('content-container').insertAdjacentHTML('beforeend', data);
})
.catch(error => console.error('Error fetching more content:', error));
}
}
// Event listener to trigger loadMoreContent function when user scrolls
window.addEventListener('scroll', loadMoreContent);
</script>
<script>
// function sendMail(){
// let params={
// name:document.getElementById('name').value,
// email:document.getElementById('email').value,
// subject:document.getElementById('subject').value,
// message:document.getElementById('message').value,
// subscribe:document.getElementById('newsletter-email').value
// }
// EmailJSResponseStatus.send("service_lktb68z","template_w79vd94",params,"o6kveYmOSDrs0l1Mg")
// .then(alert('Email sent successfully'))
// }
// document.querySelector('subscribe-btn').addEventListener('submit', sendMail());
// Function to toggle dark mode
function toggleDarkMode() {
const isDarkMode = isDarkModePreferred();
setDarkModePreference(!isDarkMode);
applyDarkModePreference();
}
// Function to apply dark mode preference
function applyDarkModePreference() {
const isDarkMode = isDarkModePreferred();
if (isDarkMode) {
document.body.classList.add('dark-mode');
document.getElementById('theme-icon').src = './assets/images/icons8-sun.svg';
} else {
document.body.classList.remove('dark-mode');
document.getElementById('theme-icon').src = './assets/images/moon_solid.svg';
}
}
document.addEventListener('DOMContentLoaded', () => {
const currentTheme = localStorage.getItem('theme');
const switchCheckbox = document.getElementById('switch');
if (!switchCheckbox) {
console.error("Switch checkbox not found!");
return;
}
const applyDarkModeStyles = () => {
document.body.classList.remove('light-mode');
document.body.classList.add('dark-mode');
};
const applyLightModeStyles = () => {
document.body.classList.remove('dark-mode');
document.body.classList.add('light-mode');
};
const initializeTheme = () => {
if (currentTheme === 'dark-mode') {
applyDarkModeStyles();
switchCheckbox.checked = true;
} else {
applyLightModeStyles();
}
};
const handleThemeChange = () => {
if (switchCheckbox.checked) {
applyDarkModeStyles();
localStorage.setItem('theme', 'dark-mode');
} else {
applyLightModeStyles();
localStorage.setItem('theme', 'light-mode');
}
};
initializeTheme();
switchCheckbox.addEventListener('change', handleThemeChange);
});
</script>
</body>
</html>