/ivanweather

IvanWeather is a weather service that returns the local wheather of a given city

Primary LanguageHTML

IvanWeather

Description:

IvanWeather is a weather service that returns the local weather of a given city.

Weather services are commonly used every day by everyone to check the weather in their city.

The site will prompt you to access your location on the homepage and it will display your weather in a nice card created with bootstrap or you can search for a city in the search bar at the top right of the screen. If you are using a mobile you have to open the hamburger menu in order to access the search bar.

This project uses an API offered by OpenWeather

Implementation

The main files of the project are app.py and functions.py.

This is the application's core where the web server is being executed.

In this file are included the functions required to run app.py

Additional files

There are other files that are needed to run the site:

The template folders contain all the HTML files of the site:

  • index.html
    • This file contains the javascript code for getting the coordinates of the client from the browser.
  • search.html;
  • layout.html
    • This file contains the head tag and the top bar HTML code and includes two javascript files.
  • fallback.html
    • This file is loaded by the service worker when there is no connection.
  • 404 error code
    • This is the file that is shown when there is a 404 error in the server. Are available:
  • weatherCard.html
    • This file is only a layout page that can be included for displaying nicely the weather information of a city.

The static folder contains nondynamic files such as images and more:

  • main.js

    • This is the main javascript file of the site and it registers the service worker.
  • style.css

    • This file contains the CSS rules that it cannot use with bootstrap.
  • img folder

    • This folder contains all the images of the site.
      • Apple icons
      • Android icons
      • Favicons
      • Ms icons
  • media folder

    • It contains the files that are needed to be in the root directory.
  • It is a file required to create a PWA (Progressive Web App) and declares some site's settings.
  • Is a file used by Heroku (the hosting service I decided to use for this app).
  • This is another file used by Heroku, where are declared the python libraries used for this project.
  • This file is used by the web crawlers in which are declared the folders that cannot be accessed.
  • This file is the service worker used to cache files so they can be accessed offline.
  • In this file I wrote all the ideas to develop for this project.

ALL THE API KEYS STORED IN THIS REPOSITORY ARE DEACTIVATED AND USELESS. THIS PROJECT USES SYSTEM VARIABLES TO STORE THE API KEY.