Skip to content

Instantly share code, notes, and snippets.

@cferdinandi
Created January 16, 2019 20:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cferdinandi/0d199802910e220085493fbe19882ce5 to your computer and use it in GitHub Desktop.
Save cferdinandi/0d199802910e220085493fbe19882ce5 to your computer and use it in GitHub Desktop.
Weather app project template from https://learnvanillajs.com.

Project Details

Write an app that gets the current weather in the visitor's location and displays it in the DOM.

You can use ipapi to get the user's location by IP address, and the Weatherbit API to get weather for a location.

Considerations

  • What happens if either of the API calls fail?
  • Should you display an icon or other visual element to complement the weather?
  • What if a user wants the temperature in Farenheit instead of Celcius (or the other way around)?

Need help?

This project is part of the Vanilla JS Academy.

<!DOCTYPE html>
<html>
<head>
<title>Project Template</title>
<style type="text/css">
body {
margin-left: auto;
margin-right: auto;
max-width: 40em;
width: 88%;
}
</style>
</head>
<body>
<h1>Weather App</h1>
<div id="app">Checking the weather near you...</div>
<script>
// Project code...
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment