-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (65 loc) · 2.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>ForeCast</title>
<link rel="stylesheet" href="style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css"
/>
</head>
<body>
<section id="weather">
<div class="container">
<div class="row d-flex justify-content-center align-items-center">
<div class="col-sm-12 col-md-8 col-lg-6 col-xl-4">
<h2 class="mb-2 mt-2 fw-normal text-center fw-bold">
Weather Forecast
</h2>
<div class="input-group rounded mb-3">
<input
type="search"
id="cityInput"
class="form-control rounded"
placeholder="Enter City Name .."
/>
<button
id="search-btn"
class="input-group-text border-0 mx-1 btn btn-success"
onclick="getForecastData()"
>
Get Weather
</button>
</div>
<h5 class="mb-2 pb-2 fw-normal text-center fw-bold">
Hourly Forecast for Today
</h5>
</div>
</div>
</div>
<div class="weather-container">
<div id="forecastContainer" class="row row-cols-1 row-cols-md-3 g-4">
<!-- Weather Forecast Here from JS-->
</div>
</div>
</section>
<!-- Chart area -->
<section id="chart">
<div class="container">
<div class="row d-flex justify-content-center align-items-center">
<div class="col-md-9">
<h3 class="mb-2 mt-5 fw-normal text-center fw-bold">
Weekly Forecast with graph
</h3>
<div id="myChartArea">
<canvas id="myChart" class="container-auto mt-2 mb-5"></canvas>
</div>
</div>
</div>
</div>
</section>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.3.0/dist/chart.umd.min.js"></script>
<script src="script.js"></script>
</body>
</html>