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

Phoenix - Alejandra Guevara and Tram Hoang #9

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix background color wave 2
tramhn001 committed Dec 3, 2024
commit 56c741a4de68bb562f1dc6ec00f18363466c21a2
18 changes: 11 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let currentTemperature = 60;
let currentTemperature = 70;

const tempValue = document.getElementById('tempValue');
const increaseTempControl = document.getElementById('increaseTempControl');
@@ -9,23 +9,23 @@ const updateTemperature = () => {

if (currentTemperature >= 80) {
tempValue.style.color = 'red';
// tempValue.style.backgroundColor = 'light red';
tempValue.style.backgroundColor = '#FFCCCC';
landScrape.textContent = "🌵__🐍_🦂_🌵🌵__🐍_🏜_🦂";
} else if (currentTemperature >= 70) {
tempValue.style.color = 'orange';
// tempValue.style.backgroundColor = 'light orange';
tempValue.style.backgroundColor = '#FFE4B5';
landScrape.textContent = "🌸🌿🌼__🌷🌻🌿_☘️🌱_🌻🌷";

Choose a reason for hiding this comment

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

Prefer ' rather than " for JS strings

} else if (currentTemperature >= 60) {
tempValue.style.color = 'yellow';
// tempValue.style.backgroundColor = 'light pink';
tempValue.style.backgroundColor = '#FFE4B5';
landScrape.textContent = "🌾🌾_🍃_🪨__🛤_🌾🌾🌾_🍃";
} else if (currentTemperature >= 50) {
tempValue.style.color = 'green';
// tempValue.style.backgroundColor = 'light green';
tempValue.style.backgroundColor = '#CCFFCC';
landScrape.textContent = "🌲🌲⛄️🌲⛄️🍂🌲🍁🌲🌲⛄️🍂🌲";
} else if (currentTemperature >= 40) {
tempValue.style.color = 'teal';
// tempValue.style.backgroundColor = 'light teal';
tempValue.style.backgroundColor = '#CCFFFF';
landScrape.textContent = "🌲🌲⛄️🌲⛄️🍂🌲🍁🌲🌲⛄️🍂🌲";
}
}
@@ -38,4 +38,8 @@ increaseTempControl.addEventListener('click', () => {
decreaseTempControl.addEventListener('click', () => {
currentTemperature -= 1;
updateTemperature();
});
});

updateTemperature();

let currentCity = cityNameInput.value;