Skip to content

Week 1 assignment: interactive portfolio page with semantic HTML, for… - #2

Open
dianadenwik wants to merge 1 commit into
HackYourAssignment:mainfrom
dianadenwik:main
Open

dianadenwik wants to merge 1 commit into
HackYourAssignment:mainfrom
dianadenwik:main

Conversation

@dianadenwik

Copy link
Copy Markdown

…ms, and DOM manipulation

Comment thread task-1/index.html
height="400"
alt="Young woman works on a computer"
/>
<button id="theme-toggle" type="button">🌙 Dark Mode</button>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This button is not working. Is a nice feature, but you are not using CSS (yet)

Comment thread task-1/index.html
src="https://plus.unsplash.com/premium_photo-1664301969414-d8435c2b91bb?fm=jpg&q=60&w=3000&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1yZWxhdGVkfDE2fHx8ZW58MHx8fHx8"
width="400"
height="400"
alt="Young woman works on a computer"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good use of alt property!

Comment thread task-1/index.html
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My First Web Page</title>
</head>
<body>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very good division and semantic HTML! header, main and footer

Comment thread task-1/script.js
const button = document.querySelector("#theme-toggle");

button.addEventListener("click", function () {
document.body.classList.toggle("dark-mode");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your are add this class, but it's not changing to dark. How would you make it work?

@rafasilpereira rafasilpereira left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Oops, you forgot the screenshot of your DevTools :S

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