Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented 5-day forecast #7

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

ThePredatorBG
Copy link
Owner

@ThePredatorBG ThePredatorBG commented Aug 26, 2022

Includes little visual adjustments to existing HTML on the "About me" page.
Also includes the changes requested in #5's review.

@ThePredatorBG ThePredatorBG requested a review from rawbirth August 26, 2022 18:23
@ThePredatorBG ThePredatorBG linked an issue Aug 26, 2022 that may be closed by this pull request
@rawbirth
Copy link
Collaborator

@ThePredatorBG Since the JS is slowly starting to grow we need to create an easy to use and scale organization of the code.

Create folders and move js

  • Create a new folder called assets
  • Inside create another folder called scripts
  • In the scripts folder move the script.js

script.js Outdated
Comment on lines 36 to 48
{
document.querySelector("#day" + (i+1) + "Min").innerHTML = "Min: " + data.list[i].main.temp_min + "°C";
}
for(i=0;i<5;i++)
{
document.querySelector("#day" + (i+1) + "Max").innerHTML = "Max: " + data.list[i].main.temp_max + "°C";
}
for(i=0;i<5;i++)
{
document.querySelector("#img" + (i+1)).src = "http://openweathermap.org/img/wn/" + data.list[i].weather[0].icon+"@2x.png";
}
console.log(data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThePredatorBG no need to do 3 loops. same can be achieved with a single loop.

Also please remove all console.logs before committing

@ThePredatorBG ThePredatorBG requested a review from rawbirth August 30, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 day forecast and city name input field
2 participants