-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforecast.html
More file actions
134 lines (128 loc) · 4.07 KB
/
forecast.html
File metadata and controls
134 lines (128 loc) · 4.07 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="forecast.css" />
<link rel="icon" href="logo.png" type="image/ico" />
<title>Weather</title>
</head>
<body class="light-theme">
<section id="nav">
<ul>
<li><a href="/index.html">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Forecast</a></li>
<li><a href="#" class="theme">Dark Mode</a></li>
</ul>
</section>
<section id="main">
<nav>
<i class="fas fa-bars toggler"></i>
<h2>Lucideus <i class="fas fa-cloud-meatball"></i></h2>
<h3 id="time"></h3>
</nav>
<main>
<form class="input">
<input type="text" class="inputValue" placeholder="Enter a city" />
<button class="button">Search</button>
</form>
<div class="spin">
<div class="loader">Loading...</div>
<p class="ml10">
<span class="text-wrapper">
<span class="letters">Gathering info...</span>
</span>
</p>
</div>
</main>
<div id="popup">
<div class="popup-flex">
<button id="popup-btn">Click Me</button>
</div>
<div id="popup-wrapper" class="popup-container">
<div class="popup-content">
<span id="close">×</span>
<p id="err">Please enable the GPS.</p>
</div>
</div>
</div>
<main id="forecast">
<h1>
<sup id="marker"><i class="fas fa-map-marker-alt"></i></sup
><span id="name"></span>
<sub id="country"></sub>
</h1>
<div class="table-responsive container">
<table class="table table-borderless table-hover">
<tbody></tbody>
</table>
</div>
</main>
</section>
<script type="text/javascript">
var popup = document.getElementById("popup-wrapper");
var btn = document.getElementById("popup-btn");
var span = document.getElementById("close");
btn.onclick = function () {
popup.classList.add("show");
};
span.onclick = function () {
popup.classList.remove("show");
};
window.onclick = function (event) {
if (event.target == popup) {
popup.classList.remove("show");
}
};
</script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
crossorigin="anonymous"
></script>
<script
src="https://code.jquery.com/jquery-3.5.1.js"
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous"
></script>
<script src="forecast.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/2.0.2/anime.min.js"></script>
<script>
var textWrapper = document.querySelector(".ml10 .letters");
textWrapper.innerHTML = textWrapper.textContent.replace(
/\S/g,
"<span class='letter'>$&</span>"
);
anime
.timeline({ loop: true })
.add({
targets: ".ml10 .letter",
rotateY: [-90, 0],
duration: 2000,
delay: (el, i) => 45 * i,
})
.add({
targets: ".ml10",
opacity: 0,
duration: 500,
easing: "easeOutExpo",
delay: 500,
});
</script>
</body>
</html>