-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set icon image according to temperature
- Loading branch information
Showing
2 changed files
with
76 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,75 @@ | ||
<!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> | ||
<!-- bootstrap --> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" | ||
rel="stylesheet" | ||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" | ||
crossorigin="anonymous" | ||
/> | ||
<!-- axios --> | ||
<script src="https://unpkg.com/axios@1.1.2/dist/axios.min.js"></script> | ||
<link rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="weather-app-wrapper"> | ||
<div class="weather-app px-5 rounded-4 shadow-lg"> | ||
<form class="search-form"> | ||
<div class="row justify-content-end"> | ||
<div class="col-5"> | ||
<input | ||
type="search" | ||
id="search" | ||
placeholder="Enter a city" | ||
autofocus="on" | ||
autocomplete="off" | ||
class="form-control shadow" | ||
/> | ||
</div> | ||
<div class="col-2 justify-content-around"> | ||
<input | ||
type="submit" | ||
value="Search" | ||
class="form-control btn shadow" | ||
id="search-btn" | ||
/> | ||
</div> | ||
<div class="col-2"> | ||
<input | ||
type="submit" | ||
value="Current" | ||
class="form-control btn shadow" | ||
id="current-btn" | ||
/> | ||
</div> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Weather App</title> | ||
<!-- bootstrap --> | ||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" /> | ||
<!-- axios --> | ||
<script src="https://unpkg.com/axios@1.1.2/dist/axios.min.js"></script> | ||
<link rel="stylesheet" href="style.css" /> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<div class="weather-app-wrapper"> | ||
<div class="weather-app px-5 rounded-4 shadow-lg"> | ||
<form class="search-form"> | ||
<div class="row justify-content-end"> | ||
<div class="col-5"> | ||
<input type="search" id="search" placeholder="Enter a city" autofocus="on" autocomplete="off" | ||
class="form-control shadow" /> | ||
</div> | ||
<div class="col-2 justify-content-around"> | ||
<input type="submit" value="Search" class="form-control btn shadow" id="search-btn" /> | ||
</div> | ||
<div class="col-2"> | ||
<input type="submit" value="Current" class="form-control btn shadow" id="current-btn" /> | ||
</div> | ||
</form> | ||
<div class="overview"> | ||
<h1 id="city"></h1> | ||
<ul> | ||
<li id="date"></li> | ||
</ul> | ||
</div> | ||
<div class="row"> | ||
<div class="col-3 d-flex justify-content-start weather-temperature"> | ||
<div | ||
class="weather-status d-flex flex-column align-items-center row-gap-3" | ||
> | ||
<img src="clear.svg" alt="" /> | ||
<p id="description"></p> | ||
</div> | ||
</form> | ||
<div class="overview"> | ||
<h1 id="city"></h1> | ||
<ul> | ||
<li id="date"></li> | ||
</ul> | ||
</div> | ||
<div class="row"> | ||
<div class="col-3 d-flex justify-content-start weather-temperature"> | ||
<div class="weather-status d-flex flex-column align-items-center row-gap-3"> | ||
<div class="weather-img"></div> | ||
<p id="description"></p> | ||
</div> | ||
<div class="weather col-5"> | ||
<div class="d-flex"> | ||
<h2 id="temperature"></h2> | ||
<div> | ||
<span class="units"> | ||
<a id="celsius" class="active">°C</a> | | ||
<a id="fahrenheit" href="">°F</a> | ||
</span> | ||
|
||
<p> | ||
<small class="weather-data" | ||
>💧 <span class="humidity"></span> 🌬️ | ||
<span class="wind"></span | ||
></small> | ||
</p> | ||
</div> | ||
|
||
</div> | ||
<div class="d-flex justify-content-end align-items-start"> | ||
</div> | ||
<div class="weather col-5"> | ||
<div class="d-flex"> | ||
<h2 id="temperature"></h2> | ||
<div> | ||
<span class="units"> | ||
<a id="celsius" class="active">°C</a> | | ||
<a id="fahrenheit" href="">°F</a> | ||
</span> | ||
|
||
<p> | ||
<small class="weather-data">💧 <span class="humidity"></span> 🌬️ | ||
<span class="wind"></span></small> | ||
</p> | ||
</div> | ||
|
||
</div> | ||
<div class="d-flex justify-content-end align-items-start"> | ||
</div> | ||
</div> | ||
</div> | ||
<footer>open-source code by <span>Annd</span> on <a href="https://github.com/anndcodes/weather-app" target="_blank">Github</a></footer> | ||
</div> | ||
<footer>open-source code by <span>Annd</span> on <a href="https://github.com/anndcodes/weather-app" | ||
target="_blank">Github</a></footer> | ||
</div> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> | ||
</div> | ||
<script src="script.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters