Open
Conversation
ameerrah9
reviewed
Jun 26, 2023
ameerrah9
left a comment
There was a problem hiding this comment.
Great work, Sydney + Agnes! 🥳
Thank you for your patience as we catch up on grading. Nice work! The HTML is structured well and the JS is clear and well-factored. This project is a Green. 🟢
Keep it up!
ameerrah9
reviewed
Jun 26, 2023
| @@ -0,0 +1,208 @@ | |||
| // // Location API | |||
| const findLatitudeAndLongitude = async (city) => { | |||
There was a problem hiding this comment.
Great function naming + use of async
ameerrah9
reviewed
Jun 26, 2023
Comment on lines
+4
to
+15
| try { | ||
| const response = await axios.get('https://weather-report-proxy-server-jk7z.onrender.com/location', | ||
| { | ||
| params: { | ||
| q: city, | ||
| } | ||
| }); | ||
|
|
||
| latitude = response.data[0].lat; | ||
| longitude = response.data[0].lon; | ||
| return { latitude, longitude }; | ||
| } catch (err) { |
ameerrah9
reviewed
Jun 26, 2023
|
|
||
| // OpenWeather API | ||
| const findTemp = async () => { | ||
| const cityname = state.cityName |
ameerrah9
reviewed
Jun 26, 2023
|
|
||
| latitude = response.data[0].lat; | ||
| longitude = response.data[0].lon; | ||
| return { latitude, longitude }; |
ameerrah9
reviewed
Jun 26, 2023
| // OpenWeather API | ||
| const findTemp = async () => { | ||
| const cityname = state.cityName | ||
| const {latitude, longitude} = await findLatitudeAndLongitude(cityname) |
ameerrah9
reviewed
Jun 26, 2023
| const {latitude, longitude} = await findLatitudeAndLongitude(cityname) | ||
|
|
||
| try { | ||
| const response = await axios.get('https://weather-report-proxy-server-jk7z.onrender.com/weather', { |
There was a problem hiding this comment.
I never checked, where you able to deploy this successfully?
ameerrah9
reviewed
Jun 26, 2023
Comment on lines
+44
to
+45
| changeColorTemp() | ||
| changeLandscape() |
ameerrah9
reviewed
Jun 26, 2023
Comment on lines
+51
to
+54
| const state = { | ||
| tempNumber: null, | ||
| cityName: "Atlanta", | ||
| } |
ameerrah9
reviewed
Jun 26, 2023
Comment on lines
+173
to
+191
| const registerEvents = () => { | ||
| initialTemp() | ||
| const decreaseButton = document.getElementById("decrease-button"); | ||
| decreaseButton.addEventListener("click", decreaseTemp) | ||
| const increaseButton = document.getElementById("increase-button"); | ||
| increaseButton.addEventListener("click", increaseTemp) | ||
| const cityTitle = document.querySelector("#city-input") | ||
| cityTitle.addEventListener("input", changeCityName) | ||
| const skySelect = document.getElementById("sky-selector") | ||
| skySelect.addEventListener("change", changeSky) | ||
| const searchCity = document.getElementById("real-temp-button") | ||
| searchCity.addEventListener("click", findTemp) | ||
| const resetButton = document.getElementById("reset-button") | ||
| resetButton.addEventListener("click", resetCityToAtlanta) | ||
| const celsius = document.getElementById('celsius') | ||
| const fahrenheit = document.getElementById('fahrenheit') | ||
| celsius.addEventListener('click', () => { | ||
| if (celsius.classList.contains('active')) { | ||
| return |
ameerrah9
reviewed
Jun 26, 2023
Comment on lines
+2
to
+16
| :root { | ||
| --sunny: linear-gradient(-45deg, white, #a7e3eb, #2596be, #23a6d5); | ||
| --cloudy: linear-gradient(-45deg, white, #a7e3eb, white, #a7e3eb); | ||
| --rainy: linear-gradient(-45deg, #4d73b0, #88a6d6, #3b5a89, #668dca); | ||
| --snowy: linear-gradient(-45deg, #dde6f3, #cdd8ea, #dde6f3, white); | ||
| } | ||
|
|
||
| * { | ||
| font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif | ||
| } | ||
|
|
||
| .sunny { | ||
| background: var(--sunny); | ||
| background-size: 400% 400%; | ||
| animation: gradient 15s ease infinite; |
ameerrah9
reviewed
Jun 26, 2023
Comment on lines
+12
to
+27
| <body id="sky-gradient" class="sunny"> | ||
| <header> | ||
| <section id="sky" class="weather-garden"> ☁️ ☁️ ☁️ ☀️ ☁️ ☁️ </section> | ||
| <section> <h1 id="weather-report-title">Weather Report</h1> | ||
| <h2 id="weather-saying">What's the weather like in...</h2> | ||
| <section > | ||
| <h2 id="city-title">Atlanta</h2> | ||
| </section> | ||
| </header> | ||
| <main> | ||
| <section id="tilecontainer"> | ||
| <section id="searchbox" class="tiles"> | ||
| <h3>Search Box For City</h3> | ||
| <input id="city-input" type="text" name="City"> | ||
| <button id="reset-button" class="bouncy"> Reset </button> | ||
| </section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.