Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panthers Nicole Mejia #84

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 4 additions & 121 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,123 +1,6 @@
# Weather Report
## Weather Report
A weather report application that displays the current weather and a five-day forecast, sets weather with user interaction and makes 3rd party API calls.

## Skills Assessed
- Link to Backend Repo: https://github.com/n1colemejia/weather-report-proxy-server

- Following directions and reading comprehension
- Structuring content in HTML
- Applying styles with CSS
- Using variables
- Creating functions
- Manipulating the DOM
- Handling events
- Using Git
- Designing an intentional user experience
- Using Axios to call 3rd party APIs
- Using a proxy server to manage API keys
- Handling asynchronous calls

## Goal

"Do I need to bring a jacket?" "Will it snow today?" "How hot will it be?" When we have questions like these, we often pull open a weather app!

Great weather apps do these two things:

1. Pull weather data from a data source
1. Display the weather in readable, compelling way

![DuckDuckGo's weather modal, which features city name, temperature reading, and the weather. Some icons show sunny weather, some icons show rainy weather, and some show cloudy weather.](ada-project-docs/assets/example-duckduckgo.png)
_Fig. DuckDuckGo's weather modal, which features city name, temperature reading, and weather icons._

Our goal is to create a fun, small weather app that focuses on displaying the weather.

Our weather app will set the weather using user interaction and get the weather from a 3rd party API, OpenWeather.

![Example weather app: The temperature reads 62, in yellow text. The selected dropdown for "Sky" is "Cloudy." There is a depiction of cloudy weather. The city name is "Hoboken." The header reads "Hoboken."](ada-project-docs/assets/cloudy-62.png)
_Fig. Example weather app displaying the weather for Hoboken._

![Example weather app: The temperature reads 85, in red text. The selected dropdown for "Sky" is "Sunny." There is a depiction of sunny weather. The city name is "Santo Domingo" The header reads "Santo Domingo."](ada-project-docs/assets/santo-domingo-85.png)
_Fig. Example weather app displaying the weather for Santo Domingo._

![Example weather app: The temperature reads 38, in teal text. The selected dropdown for "Sky" is "Snowy." There is a depiction of snowy weather. The city name is "Bozeman." The header reads "Bozeman."](ada-project-docs/assets/snow-38.png)
_Fig. Example weather app displaying the weather for Bozeman._

![Example weather app: The temperature reads 49, in teal text. The selected dropdown for "Sky" is "Rainy." There is a depiction of rainy weather. The city name is "Seattle." The header reads "Seattle."](ada-project-docs/assets/rainy-49.png)
_Fig. Example weather app displaying the weather for Seattle._

## How to Complete and Submit

Follow the requirements below and build a small weather app.

At submission time, no matter where you are, submit the project via Learn.

## JavaScript Requirements

You are required to use vanilla JavaScript for all parts of this project, including the optional enhancements.

## Axios
The only extra JavaScript library we should load is [`Axios`](https://axios-http.com/docs/intro).

To download the `axios` node module, run `yarn install`

To include axios in your project, include the following script tag below the script tag linking `index.js`:
- `<script src="./node_modules/axios/dist/axios.min.js"></script>`

This should be done during the Wave 1 initial setup of your `index.html` page.

## Workflow Requirements

- Create at least five git commits throughout this project
- Use the following files and folders:
- `index.html`
- `src/index.js`
- `styles/index.css`
- `assets` folder, potentially for holding images
- Create and add more folders and files as needed

## Content Requirements

For this project, there are no requirements around color schemes, font choices, or layouts.

Note that applying styles with CSS is one of many learning goals of this project -- it is not the central learning goal. You may enjoy being creative with styles, but we encourage you to not concern yourself with getting the styles perfect. Remember, you can always choose to continue working on styling after you've completed all functional requirements.

However, _at a minimum_, your project must contain these elements:

Wave 2:

1. An element that displays the temperature
1. A clickable element to increase temperature
1. A clickable element to decrease temperature
1. An element that displays a landscape

Wave 3:

1. An element that displays the city name
1. An element that contains an `<input type="text">` element, used to rename the city

Wave 4:

1. A clickable element to get the current temperature of the displayed city name

Wave 5:

1. A `<select>` dropdown element to set the sky type
1. An element that displays a sky

Wave 6:

1. A clickable element to reset the city name

## Detailed Content Requirements

[Wave 1: Create Wireframes and HTML](./ada-project-docs/wave-01.md)

[Wave 2: Increase and Decrease Temperature](./ada-project-docs/wave-02.md)

[Wave 3: Naming the City](./ada-project-docs/wave-03.md)

[Wave 4: Calling APIs](./ada-project-docs/wave-04.md)

[Wave 5: Selecting the Sky](./ada-project-docs/wave-05.md)

[Wave 6: Resetting the City Name](./ada-project-docs/wave-06.md)

[Optional Enhancements to inspire you](./ada-project-docs/optional-enhancements.md)
<img width="auto" alt="" src="https://github.com/n1colemejia/weather-report/assets/100858764/83e1ed1b-4923-4a6a-945b-2bf0112340f0">
Binary file added icons/cloud-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/rain-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/snow-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/sun-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 115 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather Report</title>
</head>
<body>

</body>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather Report</title>
<link rel="stylesheet" href="styles/index.css">
<link rel="stylesheet" href="styles/SN Regular WFK/stylesheet.css">
<link rel="stylesheet" href="styles/SN Fine Italics & Italics WFK/stylesheet.css">
<script src="src/index.js" type="module"></script>
<script src="/node_modules/axios/dist/axios.min.js"></script>
</head>
<body>
<header>
<h1>What are the conditions like in <span id="city-title">Chattanooga</span>?</h1>
<div id="search-form">
<div>
<label for="search-bar">City name: </label>
<input
type="text"
id="search-bar"
placeholder="Chattanooga" />
<!-- replace search text with icon -->
<button id="search-button">Search</button>
<button id="reset-button">Reset</button>
</div>
</div>
</header>
<main>
<section id="weather-report-section">
<div id="weather-report-container">
<!-- flex box for five day weather panels -->
<div id="panel-1" class="weather-panels">
<h3 id="day-1-name">Monday</h3>
<img id="day-1-icon" class="icon" src="/icons/sun-icon.png" alt="three layered circles of orange and red"/>
<h4>Temperature: <span id="day-1-temp">°</span></h4>
<h4>Humidity: <span id="day-1-hum">%</span></h4>
</div>
<div id="panel-2" class="weather-panels">
<h3 id="day-2-name">Tuesday</h3>
<img id="day-2-icon"class="icon" src="/icons/cloud-icon.png" alt="three layered circles of orange and red"/>
<h4>Temperature: <span id="day-2-temp">°</span></h4>
<h4>Humidity: <span id="day-2-hum">%</span></h4>
</div>
<div id="panel-3" class="weather-panels">
<h3 id="day-3-name">Wednesday</h3>
<img id="day-3-icon" class="icon" src="/icons/rain-icon.png" alt="three layered circles of orange and red"/>
<h4>Temperature: <span id="day-3-temp">°</span></h4>
<h4>Humidity: <span id="day-3-hum">%</span></h4>
</div>
<div id="panel-4" class="weather-panels">
<h3 id="day-4-name">Thursday</h3>
<img id="day-4-icon" class="icon" src="/icons/snow-icon.png" alt="three layered circles of orange and red"/>
<h4>Temperature: <span id="day-4-temp">°</span></h4>
<h4>Humidity: <span id="day-4-hum">%</span></h4>
</div>
<div id="panel-5" class="weather-panels">
<h3 id="day-5-name">Friday</h3>
<img id="day-5-icon" class="icon" src="/icons/sun-icon.png" alt="three layered circles of orange and red"/>
<h4>Temperature: <span id="day-5-temp">°</span></h4>
<h4>Humidity: <span id="day-5-hum">%</span></h4>
</div>
</div>
</section>
<section id="dream-weather-section">
<h2>What do you wish they were?</h2>
<div id="dream-weather-container">
<div id="dream-temp" class="dream-panels">
<h3>Dream Temperature</h3>
<div class="dream-panel-content">
<p id="dream-temp-number">°</p>
<div id="temp-buttons">
<div id="temp-increase-button" class="increase-button buttons"></div>
<div id="temp-decrease-button"class="decrease-button buttons"></div>
</div>
</div>
</div>
<div id="dream-sky" class="dream-panels">
<h3>Dream Sky</h3>
<div class="dream-panel-content">
<select name="skies" id="sky-select">
<option value="">
Pick One
</option>
<option id="sunshine-sky" value="sunshine">
Sunshine
</option>
<option id="cloudy-sky" value="clouds">
Cloudy
</option>
<option id="rain-sky" value="rain">
Rain
</option>
<option id="snow-sky" value="snow">
Snow
</option>
</select>
</div>
</div>
<div id="dream-humidity" class="dream-panels">
<h3>Dream Humidity</h3>
<div class="dream-panel-content">
Comment on lines +74 to +103

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markup looks awesome! Great work 🏁

<p id="dream-humidity-percent">%</p>
<div id="humidity-buttons">
<div id="humidity-increase-button" class="increase-button buttons"></div>
<div id="humidity-decrease-button" class="decrease-button buttons"></div>
</div>
</div>
</div>
</div>
</section>
</main>
<footer id="changing-weather-container">
<div id="circle"></div>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"axios": "^0.27.2"
"axios": "^1.2.1"
}
}
Binary file added sky-imgs/cloud-sky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sky-imgs/rain-sky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sky-imgs/snow-sky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading