Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Conversation

@malnaqeeb
Copy link

No description provided.

Copy link
Contributor

@wilgert wilgert left a comment

Choose a reason for hiding this comment

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

You did a good job! But try to clean up your code before submitting it. there is some duplication and obsolete code in your css. And my comments are to make you grow, not to make you feel bad!!

}
// the next step is to design a function to create a div => add it to the body => and call the bookLibrary(createTheMainList)
function page() {
// create div contains ul & h1
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe my explanation was not clear. But the idea is that a comment should tell why the code does something a certain way. Your comments tell the reader what the code does. But the code is already clear enough to tell that by itself.

};

// Create a function to build a list of books including the required information.
function bookLibrary(createTheMainList) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the parameter createTheMainList suggests that it is a function. But it is actually an html element. Please rename the parameter to something more appropriate.

// declare the variables to loop through the objects.(bookTitles, myBooks, bookCover)
const theTitle = bookTitles[i]; // loop through the titles (bookTitles object)
const info = myBooks[theTitle]; // loop through the book information (myBooks object)
const photoOfCover = bookCover[theTitle]; // loop through the covers (bookCover object)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please read the instructions 1.7 and 1.8 carefully again.
Doing everything in one loop and putting the img in the html in one function is not a bad solution. But it is not what was asked for.

}

p {
font-family: "Comic Sans MS", cursive, sans-serif;
Copy link
Contributor

Choose a reason for hiding this comment

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

As a side note, and maybe you already know this. But Comic Sans MS is normally not chosen as a font-family on websites. Furthermore I would not use 3 different font-families on a webpage.

background-color: rgb(255, 255, 255);
border-radius: 8px;
}
li.item{
Copy link
Contributor

Choose a reason for hiding this comment

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

All .items are li.items. So you can remove the duplicate code here.
Interesting question: what would the values for display, margin and padding be in the browser with the css that you wrote?

margin: auto;
display: block;
}
@media (min-width: 768px) and (max-width: 1024px) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Good that you thought about responsive design!

h1 {
font-size: 3em;
font-weight: bold;
color: antiquewhite;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you specify a slightly different color when the screen is at this size?

author.className = 'author';

// add language
language.innerText = 'language: ' + info.language;
Copy link
Contributor

Choose a reason for hiding this comment

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

Try to be consistent with capitals. language should be Language.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants