-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweather_map.html
More file actions
123 lines (109 loc) · 3.83 KB
/
weather_map.html
File metadata and controls
123 lines (109 loc) · 3.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Weather Map</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link href='https://api.mapbox.com/mapbox-gl-js/v2.10.0/mapbox-gl.css' rel='stylesheet' />
<!-- <link rel="stylesheet" href="css/weather_map.css">-->
<style>
body.Clouds {
/*background-color: #b0c4de; !* Light Blue for Clouds *!*/
background-image: url("image/cloudy_background.jpg");
background-size: cover;
}
body.Clear {
/*background-color: #87ceeb; !* Sky Blue for Clear *!*/
background-image: url("image/clear_background.jpg");
background-size: cover;
}
body.Rain {
background-color: #4682b4; /* Steel Blue for Rain */
background-image: url("image/rain_background.jpg");
background-size: cover;
}
body.Drizzle {
/*background-color: #87cefa; !* Light Sky Blue for Drizzle *!*/
background-image: url("image/drizzle_background.jpg");
background-size: cover;
}
body.Mist {
/*background-color: #d3d3d3; !* Light Gray for Mist *!*/
background-image: url("image/drizzle_background.jpg");
background-size: cover;
}
body.Snow {
/*background-color: #fffafa; !* Snow for Snow *!*/
background-image: url("image/snow_background.jpg");
background-size: cover;
}
body.Default {
/* Default background styles */
background-image: url("image/cloudy_background.jpg");
background-size: contain;
}
#weather-form{
margin-left: 5%;
}
#map {
width: 90%;
height: 400px;
margin-left: 5%;
box-shadow: 1px 2px 10px rgba(0, 150, 255, 0.8);
position: fixed;
bottom: 20px;
}
#weatherOutput {
margin: 20px auto;
justify-content: space-between;
width: 90%;
align-items: center;
}
.card {
max-width: 250px;
max-height: 350px;
font-size: .75em;
box-shadow: 1px 2px 10px rgba(0, 150, 255, 0.8);
}
.card-img-top {
max-height: 100px;
max-width: 100px;
}
#title-bar{
background: #0a58ca;
margin-bottom: 1.5em;
justify-content: space-between;
}
#current-city{
color: #F0F0F0;
text-wrap: none;
}
.title {
color: #F0F0F0;
margin-left: 20px;
}
</style>
</head>
<body>
<div class="row" id="title-bar">
<div class="col-3" id="title-container">
<h1 class="title">Weather App</h1>
</div>
<div class="col-2 mt-3" id="current-city"></div>
</div>
<form id="weather-form">
<label for="cityName">City Name:</label>
<input type="text" id="cityName" name="cityName" required>
<button type="submit" id="citySubmit" class="btn btn-primary">Search</button>
</form>
<div class="row" id="weatherOutput"></div>
<div class="map-container">
<div id="map"></div>
</div>
<script src="js/keys.js"></script>
<script src='https://api.mapbox.com/mapbox-gl-js/v2.10.0/mapbox-gl.js'></script>
<script src="js/weather_map.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</body>
</html>