Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

the assignment is herehttps://mega.nz/folder/vUdSzQgS#tMhulxmb4Vf6WGJvfGTqbw

1 answer below »
the assignment is herehttps://mega.nz/folder/vUdSzQgS#tMhulxmb4Vf6WGJvfGTqbw
Answered Same Day Apr 11, 2021

Solution

Neha answered on Apr 13 2021
164 Votes
Weather-Dashboard-maste
assets/css/style.css
.navbar-
and {
font-size: 36px;
}
.search-header {
font-size: 24px;
font-weight: bold;
}
.city-name {
font-size: 30px;
}
.forecast-date {
font-size: 18px;
}
Weather-Dashboard-maste
assets/images/weather-dashboard-snip.JPG
Weather-Dashboard-maste
assets/js/script.js
function initPage() {
const inputEl = document.getElementById("city-input");
const searchEl = document.getElementById("search-button");
const clearEl = document.getElementById("clear-history");
const nameEl = document.getElementById("city-name");
const cu
entPicEl = document.getElementById("cu
ent-pic");
const cu
entTempEl = document.getElementById("temperature");
const cu
entHumidityEl = document.getElementById("humidity");4
const cu
entWindEl = document.getElementById("wind-speed");
const cu
entUVEl = document.getElementById("UV-index");
const historyEl = document.getElementById("history");
let searchHistory = JSON.parse(localStorage.getItem("search")) || [];
console.log(searchHistory);

const APIKey = "c9a9ed03a355403f4cb9a36e931c0b4a";
function getWeather(cityName) {
let queryURL = "https:
api.openweathermap.org/data/2.5/weather?q=" + cityName + "&appid=" + APIKey;
axios.get(queryURL)
.then(function(response){
console.log(response);
const cu
entDate = new Date(response.data.dt*1000);
console.log(cu
entDate);
const day = cu
entDate.getDate();
const month = cu
entDate.getMonth() + 1;
const year = cu
entDate.getFullYear();
nameEl.innerHTML = response.data.name + " (" + month + "/" + day + "/" + year + ") ";
let weatherPic = response.data.weather[0].icon;
cu
entPicEl.setAttribute("src","https:
openweathermap.org/img/wn/" + weatherPic + "@2x.png");
cu
entPicEl.setAttribute("alt",response.data.weather[0].description);
cu
entTempEl.innerHTML = "Temperature: " +...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here