Instantly share code, notes, and snippets.

Embed
What would you like to do?
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