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

Sea Turtles/ Theresa Davis #67

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Sea Turtles/ Theresa Davis #67

wants to merge 5 commits into from

Conversation

perugia33
Copy link

No description provided.

Copy link

@tgoslee tgoslee left a 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 {
Copy link

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">
Copy link

Choose a reason for hiding this comment

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

you are using a lot of div tags in this file. I wanted to share a resource to help you decipher when to use div tags and when not to:
html_flowchart

@@ -0,0 +1,244 @@
// const axios = require('axios');

const state ={
Copy link

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)
Copy link

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

Comment on lines +65 to +116
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}`)
}
}
Copy link

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

Comment on lines +187 to +196
// 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
Copy link

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();
Copy link

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 = ( ) => {
Copy link

Choose a reason for hiding this comment

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

👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants