-
Notifications
You must be signed in to change notification settings - Fork 88
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
Sea Turtles/ Theresa Davis #67
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job Theresa !! Your app is fully functional and looks good. I would suggest going through your code and cleaning up console logs before submitting your code. I left some comments to let me know if you have any questions.
@@ -0,0 +1,251 @@ | |||
:root { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your css page looks good. Remove the commented properties that you aren't using.
|
||
|
||
<header class = "container"> | ||
<div id=" header"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,244 @@ | |||
// const axios = require('axios'); | |||
|
|||
const state ={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
const updateSky = (e) =>{ | ||
e.preventDefault() | ||
let selectSkyValue = document.getElementById("skyOptions").value; | ||
console.log(selectSkyValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove your console log here and on line 22, 29, 35, 42
const increaseTemp = () =>{ | ||
|
||
const temperature = document.getElementById("temperature"); | ||
state.temperature += 1; | ||
temperature.textContent = `${state.temperature}°`; | ||
updateTempColor(); | ||
|
||
console.log(temperature) | ||
} | ||
|
||
|
||
const decreaseTemp = () =>{ | ||
|
||
const temperature = document.getElementById("temperature"); | ||
// const tempColor = document.getElementById("tempColor"); | ||
state.temperature -= 1; | ||
temperature.textContent = `${state.temperature}°`; | ||
updateTempColor(); | ||
console.log(temperature) | ||
} | ||
|
||
|
||
const updateTempColor = () =>{ | ||
const tempColor = document.getElementById("tempColor"); | ||
const newTemp = state.temperature; | ||
if (newTemp >= 70 && newTemp <= 79){ | ||
tempColor.className = `warm`; | ||
console.log(`${tempColor.className}`) | ||
} | ||
|
||
else if (newTemp >= 80){ | ||
tempColor.className = `very-hot`; | ||
console.log(state.temperature) | ||
console.log(` this is the class name ${tempColor.className}`) | ||
} | ||
|
||
else if (newTemp >= 60 && newTemp <= 69){ | ||
tempColor.className = `cool`; | ||
console.log(`${tempColor.className}`) | ||
} | ||
|
||
else if (newTemp >= 50 && newTemp <= 59){ | ||
tempColor.className = `chilly`; | ||
console.log(`${tempColor.className}`) | ||
} | ||
|
||
else if (newTemp <= 49){ | ||
tempColor.className = `cold`; | ||
console.log(state.temperature) | ||
console.log(` this is the class name ${tempColor.className}`) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove all of the console logs. Instead of else if I want you to also look at using a switch statement take a look https://www.w3schools.com/js/js_switch.asp
// resetCity = "" | ||
// state.cityName = "Seattle WA" | ||
// location.textContent = `${state.location}`; | ||
// console.log(`${state.location}`) | ||
|
||
} | ||
// let inputValue = document.getElementById("location").value; | ||
// let cityName = document.getElementById("cityName").innerHTML | ||
// document.getElementById("cityName").innerHTML = inputValue; | ||
// state.cityName = inputValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean this up
|
||
|
||
|
||
// function call - getLatAndLong(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
// state.cityName = inputValue | ||
|
||
// REGISTER EVENT HANDLERS | ||
const registerEventHandlers = ( ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
No description provided.