-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
116 lines (116 loc) · 3.51 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="shortcut icon"
href="./Images/icons8-night-32.png"
type="image/x-icon"
/>
<title>Weather App</title>
<script
src="https://kit.fontawesome.com/afb375d526.js"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="./Style/style.css" />
<link rel="manifest" href="./manifest.json" />
</head>
<body>
<div class="card">
<div class="search">
<input
type="text"
placeholder="Enter the city name"
spellcheck="false"
/>
<button onclick="handleClick()">
<i class="fa-solid fa-magnifying-glass"></i>
</button>
</div>
<div class="error">
<i class="fa-regular fa-circle-xmark"></i> Invalid City name
</div>
<div class="weather">
<img class="weather-icon" src="./Images/rain.png" alt="Raining" />
<h1 class="temp">00 °C</h1>
<h2 class="city">City</h2>
<div class="details">
<div class="col">
<img src="./Images/humidity.png" alt="humidity" />
<div>
<p class="humidity">00%</p>
<p>Humidity</p>
</div>
</div>
<div class="col">
<img src="./Images/wind.png" alt="Wind" />
<div>
<p class="wind">00 km/h</p>
<p>Wind Speed</p>
</div>
</div>
</div>
</div>
</div>
<p
style="
text-align: center;
background: linear-gradient(135deg, #00feba, #5b548a);
width: fit-content;
margin: 0 auto;
border-radius: 20px;
padding: 5px;
color: #ebfffc;
"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/"
>
<span property="dct:title">Weather App</span> by
<a
style="text-decoration: none"
rel="cc:attributionURL dct:creator"
property="cc:attributionName"
href="https://github.com/elsa33eed"
>Mohamed Saeed</a
>
is marked with
<a
style="text-decoration: none"
href="http://creativecommons.org/publicdomain/zero/1.0?ref=chooser-v1"
target="_blank"
rel="license noopener noreferrer"
style="display: inline-block"
>CC0 1.0 Universal<img
style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
"
src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" /><img
style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
"
src="https://mirrors.creativecommons.org/presskit/icons/zero.svg?ref=chooser-v1"
/></a>
</p>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="./javascript/main.js"></script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker
.register("./javascript/service-worker.js")
.then((registration) => {
console.log("Service Worker registered:", registration);
})
.catch((error) => {
console.error("Service Worker registration failed:", error);
});
});
}
</script>
</body>
</html>