This repository was archived by the owner on Jan 3, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 147
WM3_Sinead-Osborne_JS2-Week3 #103
Open
Sinead-CYF
wants to merge
12
commits into
CodeYourFuture:main
Choose a base branch
from
Sinead-CYF:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
caab37d
Exercise-1 complete
Sinead-CYF 9fce88a
Update to exercises
Sinead-CYF e701de5
Updated Alarm - Needs fixing.
Sinead-CYF 5010a85
Quotes Generator Complete
Sinead-CYF b9e3a49
Slideshow 95% complete
Sinead-CYF 72a12a5
Tinkering
Sinead-CYF 621abd8
Updated Alarm Clock
Sinead-CYF 6af9dc6
Tinkering
Sinead-CYF f870d5a
Slideshow updated - All buttons functioning.
Sinead-CYF bc15c00
Alarm Clock fully Functioning
Sinead-CYF 3eafb4f
Updated Movie List - Fully Functional
Sinead-CYF 92fa3ba
Exercise 2 (display movies) Improved Code
Sinead-CYF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "liveServer.settings.port": 5501 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,46 @@ | ||
| console.log("Testing JS file loaded!") | ||
| console.log("Testing JS file loaded!"); | ||
|
|
||
| // Task 1 | ||
|
|
||
| // Without changing any of the HTML or CSS, update the <section> tags so that they have white backgrounds. | ||
|
|
||
|
|
||
|
|
||
| // Without changing any of the HTML or CSS, update | ||
| // the <section> tags so that they have white backgrounds. | ||
|
|
||
| let sectionEls = document.querySelectorAll("section"); | ||
|
|
||
| sectionEls.forEach((element) => { | ||
| element.style.backgroundColor = "white"; | ||
| }); | ||
|
|
||
| // Task 2 | ||
|
|
||
| // Without changing any of the HTML or CSS, update the images on the page so that they are all centered. | ||
|
|
||
| // Hint: look at the CSS to see if there are any classes already written which you can use. | ||
|
|
||
|
|
||
| // Without changing any of the HTML or CSS, | ||
| // update the images on the page so that they are all centered. | ||
|
|
||
| // Hint: look at the CSS to see if there are any classes | ||
| // already written which you can use. | ||
|
|
||
| let images = document.querySelectorAll("img"); | ||
|
|
||
| images.forEach((image) => { | ||
| image.classList.add("content-title"); | ||
| }); | ||
|
|
||
| // Task 3 | ||
|
|
||
| // Google the date of birth and death of each of the people on the page. Without changing any of the HTML or CSS, add this in a paragraph to the end of their <section>. | ||
| // Google the date of birth and death of each of the | ||
| // people on the page. Without changing any of the HTML or CSS, | ||
| // add this in a paragraph to the end of their <section>. | ||
|
|
||
| sectionEls.forEach((section, index) => { | ||
| let paras = document.createElement("p"); | ||
| if (index === 0) { | ||
| section.appendChild(paras).textContent = | ||
| "Born: December 9, 1906, Died: January 1, 1992."; | ||
| } else if (index === 1) { | ||
| section.appendChild(paras).textContent = | ||
| "Born: August 26, 1918, Died: February 24, 2020."; | ||
| } else { | ||
| section.appendChild(paras).textContent = | ||
| "Born: December 10, 1815, Died: November 27, 1852."; | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good Sinead, nice and simple, clearly written well done.