Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 934 Bytes

File metadata and controls

15 lines (8 loc) · 934 Bytes

Weather App

This week the project was to create a weather app by using APIs and using different methods to retrieve and convert the data, such as fetch and convert unix time.

The problem

I started with adding the HTML and CSS code. Then I moved on to JS where I added the API and console.logged it. Then I moved on to adding the DOM selectors and created the first function to fetch the current weather data and sunset/sunrise time. After this was achived I moved on to converting the sunset/sunrise time. I needed help from chatGPT to achieve this and also how to get the forecast data which was not as straight forward as the current weather data.

Then I also managed to change the background color, color (fonts) and images depending on weather description, for this I used if/if else statements.

If I had more time I would also look into the geolocation API.

View it live

https://checkthe-weather.netlify.app/