Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

NW-6 | AREEB-SATTAR | JS2| [TECH ED] Reading List| WEEK-3 #221

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

Conversation

areebsattar
Copy link

@areebsattar areebsattar commented Jan 24, 2024

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

I have created the reading list app

Questions

Copy link

netlify bot commented Jan 24, 2024

Deploy Preview for cute-gaufre-e4b4e5 ready!

Name Link
🔨 Latest commit 0ce9cfa
🔍 Latest deploy log https://app.netlify.com/sites/cute-gaufre-e4b4e5/deploys/65b165d9fa5fcd0008c29798
😎 Deploy Preview https://deploy-preview-221--cute-gaufre-e4b4e5.netlify.app/week-3/reading-list
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

for (const item of books) {
const list = document.createElement("li");

list.setAttribute("class", item.alreadyRead ? "teal" : "red");
Copy link
Member

Choose a reason for hiding this comment

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

I'm going to be really picky, but hopefully this is a useful note!

As much as possible, it's good to keep your styling separate from logic. You could use class names like "read" and "unread", then only use CSS to decide what the colour should be.

This is really useful for modifying your site in the future, as all colour choices are together in the CSS. There is also a scenario where your site might have different themes, for example, a light and dark mode. The colours for read and unread books might not always be the same in each mode.

Copy link
Author

Choose a reason for hiding this comment

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

That makes sense, I will keep that in mind, Thank you

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<script defer src="script.js"></script>
Copy link
Member

Choose a reason for hiding this comment

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

Nice use of the defer attribute!

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

Successfully merging this pull request may close these issues.

2 participants