-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
71 lines (57 loc) · 2.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web Animation</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<section class="sence">
<div class="sun"></div>
<div class="bg"></div>
<div class="privateCar">
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<lottie-player src="https://assets6.lottiefiles.com/packages/lf20_nk90bthw.json" background="transparent"
speed="1" loop autoplay></lottie-player>
</div>
<div class="truck">
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<lottie-player src="https://assets10.lottiefiles.com/packages/lf20_byhlmqzj.json" background="transparent"
speed="1" loop autoplay></lottie-player>
</div>
<div class="zip">
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<lottie-player src="https://assets10.lottiefiles.com/packages/lf20_dpaweuua.json" background="transparent"
speed="1" loop autoplay></lottie-player>
</div>
<div class="bus">
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<lottie-player src="https://assets6.lottiefiles.com/packages/lf20_tlspeeip.json" background="transparent"
speed="1" loop autoplay></lottie-player>
</div>
<div class="road"></div>
</section>
<script>
if (localStorage.getItem('theme') == null) {
localStorage.setItem('theme', 'light');
}
const localData = localStorage.getItem('theme');
if (localData == 'light') {
document.body.classList.remove("dark")
} else if (localData == 'dark') {
document.body.classList.add("dark")
}
var x = document.querySelector(".sun");
x.onclick = function () {
document.body.classList.toggle("dark");
if (document.body.classList.contains("dark")) {
localStorage.setItem('theme', 'dark');
} else {
localStorage.setItem('theme', 'light');
}
}
</script>
</body>
</html>