Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
aakanshimalik authored Jan 5, 2024
1 parent d08ae32 commit d7088a0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions weather2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Weather App </title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="weather2/style.css">
</head>

<body>
<div class="card">
<div class="search">
<input type="text" placeholder="enter city name" spellcheck="false">
<button><img src="images/search.png"></button>
<button><img src="weather2/images/search.png"></button>
</div>
<div class="error">
<p>Invalid city name</p>
</div>
<div class="weather">
<img src="images/rain.png" class="weather-icon">
<img src="weather2/images/rain.png" class="weather-icon">
<h1 class="temp">22°C</h1>
<h2 class="city">New York</h2>
<div class="details">
<div class="col">
<img src="images/humidity.png">
<img src="weather2/images/humidity.png">
<div>
<p class="humidity">50%</p>
<p>Humidity</p>
</div>
</div>
<div class="col">
<img src="images/wind.png">
<img src="weather2/images/wind.png">
<div>
<p class="wind">15 km/h</p>
<p>Wind Speed</p>
Expand Down Expand Up @@ -67,19 +67,19 @@ <h2 class="city">New York</h2>
document.querySelector(".wind").innerHTML = data.wind.speed + "km/h";

if (data.weather[0].main == "Clouds") {
weatherIcon.src = "images/clouds.png";
weatherIcon.src = "weather2/images/clouds.png";
}
else if (data.weather[0].main == "Clear") {
weatherIcon.src = "images/clear.png";
weatherIcon.src = "weather2/images/clear.png";
}
else if (data.weather[0].main == "Rain") {
weatherIcon.src = "images/rain.png";
weatherIcon.src = "weather2/images/rain.png";
}
else if (data.weather[0].main == "Drizzle") {
weatherIcon.src = "images/drizzle.png";
weatherIcon.src = "weather2/images/drizzle.png";
}
else if (data.weather[0].main == "Mist") {
weatherIcon.src = "images/mist.png";
weatherIcon.src = "weather2/images/mist.png";
}

document.querySelector(".weather").style.display = "block";
Expand All @@ -102,4 +102,4 @@ <h2 class="city">New York</h2>

</body>

</html>
</html>

0 comments on commit d7088a0

Please sign in to comment.