Skip to content

Conversation

@Sky-A-Fox
Copy link

@Sky-A-Fox Sky-A-Fox commented Sep 19, 2025

Re-pushed assignment for 1st week of browsers.
All tasks are done.

@dardecena dardecena self-requested a review September 24, 2025 15:50
Copy link

@dardecena dardecena left a comment

Choose a reason for hiding this comment

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

Great Job!!!! 🚀

Comment on lines +4 to +7
const ul = document.createElement("ul");
books.forEach((book, i) => {
const li = document.createElement("li");
const p = document.createElement("p");

Choose a reason for hiding this comment

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

👍

Comment on lines +10 to +11
book.image = book.title.toLowerCase().replace(/ /g, "_") + ".jpg";
const img = document.createElement("img");

Choose a reason for hiding this comment

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

👍

Another option is to add the field "image" to the myBooks data array objects, and hardcode the URL there.

img.src = `./assets/${book.image}`;
img.alt = book.title;
li.appendChild(img);
li.style.backgroundColor = book.alreadyRead ? "green" : "red";

Choose a reason for hiding this comment

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

👍

Comment on lines +2 to +11
list-style-type: none;
padding: 0;
margin: 0;
}
li {
display: inline-block;
width: 400px;
margin: 8px;
padding: 8px;
}

Choose a reason for hiding this comment

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

👍

Comment on lines +2 to +4
document.querySelector("#nickname").textContent = "Fox13613";
document.querySelector("#fav-food").textContent = "Dragon-Barbecue";
document.querySelector("#hometown").textContent = "Vanished in the ash of war";

Choose a reason for hiding this comment

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

👍

Comment on lines +29 to +30
cat.src =
"https://media1.tenor.com/images/2de63e950fb254920054f9bd081e8157/tenor.gif";

Choose a reason for hiding this comment

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

👍

img {
position: absolute;
top: 15%;
left: 0px;

Choose a reason for hiding this comment

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

👍

Comment on lines +9 to +18
if (isDancing) return;

let currentLeft = parseInt(cat.style.left, 10);
let newLeft = currentLeft + 10;

if (newLeft > window.innerWidth - cat.width) {
newLeft = 0;
}

cat.style.left = newLeft + "px";

Choose a reason for hiding this comment

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

👍

Comment on lines +38 to +40
window.onload = () => {
walkTimer = setInterval(catWalk, 50);
};

Choose a reason for hiding this comment

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

👍

Comment on lines +32 to +35
setTimeout(() => {
cat.src = originalSrc;
isDancing = false;
}, 5000);

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants