Skip to content

About

Responsive weather app built with vanilla JavaScript and the OpenWeatherMap API. Search any city to see temperature, humidity, wind speed and country, with loading and error states.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

A clean, responsive weather app. Type any city and instantly see the current temperature, conditions, humidity, wind speed and country, with a matching weather icon.

Live demo: https://markehab1.github.io/Weather-App/

Features

  • Search any city by clicking the search button or pressing Enter
  • Shows temperature (°C), weather description, humidity, wind speed (km/h) and country
  • Weather icon that changes with the condition (clouds, clear, rain, drizzle, mist, snow)
  • Loading indicator while the weather is being fetched
  • Friendly messages for an invalid city name and for no internet connection
  • Responsive layout for phones, tablets and desktops
  • Respects reduced-motion settings

Built with

Run it locally

  1. Clone the repository:
    git clone https://github.com/Markehab1/Weather-App.git
    cd Weather-App
  2. Get a free API key from OpenWeatherMap. New keys can take up to 2 hours to activate.
  3. Open main.js and put your key on the first line:
    const apiKey = "YOUR_API_KEY";
  4. Open index.html in your browser.

Project structure

Weather-App/
├── index.html   # page structure
├── main.css     # styles and responsive layout
├── main.js      # API call, error handling and UI updates
└── Images/      # weather icons

What I practiced

  • Fetching data from a REST API and handling errors (invalid city, network failure)
  • Converting units (the API returns wind in m/s, converted to km/h)
  • Building a responsive layout with media queries

Author

Mark Ehab | Front-End Developer LinkedIn · GitHub

About

Responsive weather app built with vanilla JavaScript and the OpenWeatherMap API. Search any city to see temperature, humidity, wind speed and country, with loading and error states.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages