Skip to content

Commit 9feb8b4

Browse files
Merge pull request #2 from codercreative/lesson-15
open api app completed
2 parents 5e5e52f + cef3cb4 commit 9feb8b4

18 files changed

Lines changed: 766 additions & 233 deletions

README.md

Lines changed: 75 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,91 @@
11
# Open API App
22

3-
[Open Meteo](https://open-meteo.com)
4-
[Open Meteo Geocoding]("https://open-meteo.com/en/docs/geocoding-api)
3+
**_Data provided by Open-Meteo:_**
4+
5+
- [Open Meteo](https://open-meteo.com)
6+
- [Open Meteo Geocoding](https://open-meteo.com/en/docs/geocoding-api)
7+
8+
## Live site
9+
10+
- Click on the link to the upper right of this page to access the live link (pending......)
511

612
## Overview
713

8-
- A simple weather app that uses Open Meteo APIs to show real-time weather data based on the user's city input
9-
- The app displays a weather code illustration, temperature, and the city and country names
14+
- A simple weather app that uses Open Meteo APIs to show real-time weather data for the US based on the user's zip code input
15+
- The app displays current temperature, city, state and an illustration based on the called api's weather code
16+
- The user can then click on a second icon that will reveal the apparent temperature, wind speed, wind direction and UV index for the selected zip code
17+
18+
<p>
19+
<img src="images/default-screenshot.png" alt="weather app default display" height="50%">
20+
<img src="images/example-screenshot.png" alt="weather app example display (New York zip code 10001)" height="50%">
21+
</p>
1022

1123
## How It Works
1224

13-
The user enters the name of a city, and the app displays:
25+
The user enters a zip code, clicks on the temperature icon and the app displays:
1426

15-
- A weather code illustration
1627
- The current temperature
17-
- The city and country names
28+
- The city and state names
29+
- An illustration I have designed that reflects the weather code
30+
31+
The user can then select the "angles-down" icon in order to display additional weather conditions:
32+
33+
- Apparent temperature
34+
- Wind speed
35+
- Wind direction
36+
- UV index
1837

1938
## Key Features
2039

21-
- Fetches live weather data using two Open Meteo APIs
22-
- Displays weather condition (via an illustration), temperature and location
40+
- Fetches live weather data using two Open Meteo APIs from user's zip code input
41+
- Displays various weather conditions
2342
- Pulling API data with async/await JavaScript promises as well as helper functions
2443

25-
## Still in Progress
44+
## App Checklist Examples
45+
46+
### API Requirement
47+
48+
- Added two search buttons
49+
50+
### HTML
51+
52+
- Added copyright in footer
53+
- Reconsidered Google Fonts (Kept Unica and changed Roboto to Lexend)
54+
- Created a favicon
55+
56+
### CSS
57+
58+
- Stored CSS and JS files in folders
59+
- Decided that layout should be in a column on all sizes
60+
- Centered the placeholder in the zip code input field
61+
- Showing a default sun illustration when the app loads
62+
- Added media queries for larger displays
63+
- Added colors as variables in :root
64+
65+
### JS
66+
67+
- Used global variables for access in helper functions
68+
- Corrected the image paths after placing script.js in a js folder
69+
- Added "Just a sec..." for temp if it takes too long to load
70+
- Added night images (to replace two images of suns if local time is night) based on isDay variable
71+
- Decided which weather details to add from the second api async function call
72+
- Converted celsius into fahrenheit (in more information api call)
73+
- Used wind range based on Beaufort wind scale
74+
- Clear user input when and placeholder when user enters a new search based on zip code
75+
76+
### Error message handling
77+
78+
- Checked for valid 5 number zip code
79+
- Display an error message if no zip code is entered or if the input is invalid
80+
81+
## Future considerations
82+
83+
- Had issues with linear-gradient background color. Will possibly add that at a later date and overcome CSS issues (height, overlap of text, etc.)
84+
- Example of linear-gradient code:
85+
86+
```css
87+
linear-gradient(145deg, #fff085, #feba17)
88+
```
2689

27-
- Complete function that displays illustration based on city's weather code
28-
- Show a default sun illustration when the app loads
29-
- Display an error message if no city is entered or if the input is invalid
30-
- Clear the input field after displaying the city data
90+
- Optimize padding and margins even more
91+
- When clicking outside of zip code field - be able to clear too?

0 commit comments

Comments
 (0)