-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
95 lines (92 loc) · 4.49 KB
/
index.html
File metadata and controls
95 lines (92 loc) · 4.49 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta tags for character set, viewport, and compatibility -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<!-- Font Awesome CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="./assets/css/style.css">
<!-- Title of the webpage -->
<title>Weather Dashboard</title>
</head>
<body>
<!-- Header section -->
<header class="container-fluid text-center text-white bg-success p-2">
<h1>Weather Dashboard</h1>
</header>
<!-- Main content -->
<div class="container-fluid">
<div class="row">
<!-- Sidebar for search functionality -->
<div class="col-lg-3 bg-success">
<h5 class="mt-1 text-white">Search for a City:</h5>
<!-- Input group for city search -->
<div class="input-group mb-3">
<input id="enter-city" type="text" class="form-control" placeholder="Enter a city" aria-label="Enter a city">
<div class="input-group-append">
<!-- Search button -->
<button class="btn btn-success" type="button" id="search-button">
<i class="fas fa-search"></i>
</button>
</div>
</div>
<!-- Button to clear search history -->
<button class="btn btn-success mb-3" type="button" id="clear-history">Clear history</button>
<!-- Form for displaying search history -->
<form id="history"></form>
</div>
<!-- Main content area for weather display -->
<div class="col-lg-9">
<div class="row mr-0">
<!-- Card for today's weather -->
<div class="col-lg-11 card m-3 d-none bg-success text-white" id="today-weather">
<div class="card-body">
<!-- Display city name -->
<h3 id="city-name" class="city-name align-middle"></h3>
<!-- Display current weather image -->
<img id="current-pic" alt="">
<!-- Display temperature -->
<p id="temperature"></p>
<!-- Display humidity -->
<p id="humidity"></p>
<!-- Display wind speed -->
<p id="wind-speed"></p>
<!-- Display UV index -->
<p id="UV-index"></p>
</div>
</div>
</div>
<!-- Header for 5-day forecast -->
<div class="row d-none" id="fiveday-header">
<div class="col-12 text-white">
<h3>5-Day Forecast</h3>
</div>
</div>
<!-- Forecast cards for each day -->
<div class="row">
<div class="col-md-2 forecast bg-success text-white m-2 rounded"></div>
<div class="col-md-2 forecast bg-success text-white m-2 rounded"></div>
<div class="col-md-2 forecast bg-success text-white m-2 rounded"></div>
<div class="col-md-2 forecast bg-success text-white m-2 rounded"></div>
<div class="col-md-2 forecast bg-success text-white m-2 rounded"></div>
</div>
</div>
</div>
</div>
<!-- External JavaScript libraries -->
<!-- Day.js for date manipulation -->
<!-- Day.js -->
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
<!-- jQuery for DOM manipulation -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Axios for HTTP requests -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!-- Custom JavaScript -->
<script src="./assets/script/script.js"></script>
</body>
</html>