Skip to content

amrit100612/Weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Weather

A beautiful, responsive weather application that provides real-time weather information for any location worldwide.

Weather App Demo HTML5 CSS3 JavaScript

✨ Features

  • 🌍 Global Coverage - Get weather data for any city or region worldwide
  • 🎨 Beautiful UI - Clean, modern interface with gradient backgrounds
  • 📱 Responsive Design - Works perfectly on desktop, tablet, and mobile devices
  • Real-time Data - Powered by WeatherAPI for accurate, up-to-date information
  • 🔍 Smart Search - Enter locations in various formats (city, state, country)
  • Error Handling - User-friendly error messages for invalid locations

🚀 Quick Start

Prerequisites

  • A modern web browser
  • Internet connection for API calls

Installation

  1. Clone or download the project files
  2. Open index.html in your web browser
  3. Start searching for weather information!
# If using git
git clone <your-repo-url>
cd weather-app
open index.html

🎯 How to Use

  1. Enter a location in the search box (e.g., "London", "New York", "Bihar")
  2. Click the "Get Weather" button or press Enter
  3. View the current temperature and location details instantly

Supported Location Formats

  • City names: London, Tokyo, Mumbai
  • States/Regions: California, Bihar, Texas
  • Countries: India, France, Australia
  • Combinations: Paris, France, Mumbai, India

🛠️ Technical Details

Built With

  • HTML5 - Structure and semantic markup
  • CSS3 - Styling with modern features (flexbox, gradients, shadows)
  • Vanilla JavaScript - API integration and DOM manipulation
  • WeatherAPI - Real-time weather data provider

API Information

This app uses the WeatherAPI service:

  • Endpoint: http://api.weatherapi.com/v1/current.json
  • Features: Current weather conditions, location details
  • Rate Limit: Free tier includes sufficient requests for personal use

Browser Compatibility

  • ✅ Chrome (recommended)
  • ✅ Firefox
  • ✅ Safari
  • ✅ Edge
  • ✅ Mobile browsers

🎨 UI/UX Features

Visual Design

  • Gradient Background: Soothing blue-to-cyan gradient
  • Glass Effect: Clean white container with subtle shadows
  • Typography: Clear, readable Arial font family
  • Color Scheme: Professional blue (#0077ff) with hover effects

Responsive Elements

  • Flexible Layout: Centers content on all screen sizes
  • Scalable Input: 80% width input field for optimal mobile experience
  • Touch-Friendly: Large buttons and clickable areas

🔧 Customization

Changing the API Key

Update the API key in the JavaScript section:

const apiKey = "YOUR_NEW_API_KEY_HERE";

Styling Modifications

Key CSS classes you can customize:

  • .weather-container - Main app container
  • .result - Weather display styling
  • .error - Error message appearance
  • body - Background gradient

Adding Features

The modular structure makes it easy to add:

  • Weather forecasts
  • Additional weather parameters
  • Geolocation detection
  • Weather icons
  • Temperature unit conversion

🚨 Error Handling

The app gracefully handles various error scenarios:

  • Empty Input: "Please enter a location."
  • Invalid Location: "Could not fetch weather. Please try a valid location."
  • Network Issues: Automatic retry suggestions
  • API Errors: User-friendly error messages

🔒 Security & Privacy

  • HTTPS Ready: Can be easily converted to use HTTPS endpoints
  • No Data Storage: No personal information is stored locally
  • API Key Protection: Consider environment variables for production

📈 Performance

  • Lightweight: Minimal dependencies, fast loading
  • Efficient: Single API call per search
  • Optimized: Clean, semantic HTML and efficient CSS

🤝 Contributing

Want to improve the Weather App? Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Ideas for Contributions

  • Weather icons and animations
  • Extended forecast (7-day, hourly)
  • Geolocation support
  • Temperature unit toggle (°C/°F)
  • Weather alerts and warnings
  • Dark/light theme toggle

🙏 Acknowledgments

  • WeatherAPI - For providing reliable weather data
  • CSS Gradient - For the beautiful background inspiration
  • MDN Web Docs - For excellent web development resources

Made with ❤️ for weather enthusiasts worldwide

⭐ Star this repo | 🐛 Report Bug | 💡 Request Feature

About

Check Weather with the help of API Call

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages