-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
89 lines (79 loc) · 1.79 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Weather App</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #f0f0f0;
}
.container {
background: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 8px;
text-align: center;
width: 80%;
max-width: 400px;
}
h1 {
color: #333;
}
input,
button {
width: 80%;
padding: 10px;
margin: 10px 0;
font-size: 16px;
border-radius: 5px;
}
input {
border: 1px solid #ddd;
}
button {
background-color: #4caf50;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
.result p {
font-size: 18px;
color: #333;
}
.weather-icon {
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div class="container">
<h1>Weather App</h1>
<form action="/" method="post">
<input
type="text"
name="cityName"
placeholder="e.g., London"
required
/>
<button type="submit">Go</button>
</form>
<div class="result">
<p id="weather-desc"></p>
<p id="temp"></p>
<img id="weather-icon" class="weather-icon" src="" alt="Weather Icon" />
</div>
</div>
</body>
</html>
v