diff --git a/Week1/homework/Thumbs.db b/Week1/homework/Thumbs.db
new file mode 100644
index 000000000..561531410
Binary files /dev/null and b/Week1/homework/Thumbs.db differ
diff --git a/Week1/homework/app.js b/Week1/homework/app.js
index a9b5f75d8..5400364e1 100644
--- a/Week1/homework/app.js
+++ b/Week1/homework/app.js
@@ -2,10 +2,144 @@
{
const bookTitles = [
- // Replace with your own book titles
- 'harry_potter_chamber_secrets',
+ 'neverwhere',
+ 'kushiels_chosen',
+ 'huckleberry_finn',
+ 'dragons_of_autumn_twilight',
+ 'darkness_visible',
+ 'the_things_they_carried',
+ 'milk_and_honey',
+ 'japan_at_war',
+ 'the_secret_circle',
+ 'basho',
];
- // Replace with your own code
- console.log(bookTitles);
+ const booksInfo = {
+ neverwhere: {
+ title: 'Neverwhere',
+ author: 'Neil Gaiman',
+ language: 'English',
+ image: 'neverwhere.jpg',
+ image_alt: 'Neverwhere Cover',
+ goodreads: 'https://www.goodreads.com/book/show/14497.Neverwhere?from_search=true',
+ },
+ kushiels_chosen: {
+ title: "Kushiel's Chosen",
+ author: 'Jacqueline Carey',
+ language: 'English',
+ image: 'kushiels_chosen.jpg',
+ image_alt: "Kushiel's Chosen Cover",
+ goodreads: 'https://www.goodreads.com/book/show/395962.Kushiel_s_Chosen?from_search=true',
+ },
+ huckleberry_finn: {
+ title: 'Huckleberry Finn',
+ author: 'Mark Twain',
+ language: 'English',
+ image: 'huckleberry_finn.jpg',
+ image_alt: 'Huckleberry Finn Cover',
+ goodreads: 'https://www.goodreads.com/book/show/2956.The_Adventures_of_Huckleberry_Finn?from_search=true',
+ },
+ dragons_of_autumn_twilight: {
+ title: 'Dragons of Autumn Twilight',
+ author: 'Margaret Weis and Tracy Hickman',
+ language: 'English',
+ image: 'dragons_of_autumn_twilight.jpg',
+ image_alt: 'Dragons of Autumn Twilight Cover',
+ goodreads: 'https://www.goodreads.com/book/show/259836.Dragons_of_Autumn_Twilight?ac=1&from_search=true',
+ },
+ darkness_visible: {
+ title: 'Darkness Visible',
+ author: 'William Styron',
+ language: 'English',
+ image: 'darkness_visible.jpg',
+ image_alt: 'Darkness Visible Cover',
+ goodreads: 'https://www.goodreads.com/book/show/249042.Darkness_Visible?from_search=true',
+ },
+ the_things_they_carried: {
+ title: 'The Things They Carried',
+ author: "Tim O'Brien",
+ language: 'English',
+ image: 'the_things_they_carried.jpg',
+ image_alt: 'The Things They Carried Cover',
+ goodreads: 'https://www.goodreads.com/book/show/133518.The_Things_They_Carried?from_search=true',
+ },
+ milk_and_honey: {
+ title: 'Milk and Honey',
+ author: 'Rupi Kaur',
+ language: 'English',
+ image: 'milk_and_honey.jpg',
+ image_alt: 'Milk and Honey Cover',
+ goodreads: 'https://www.goodreads.com/book/show/23513349-milk-and-honey?from_search=true',
+ },
+ japan_at_war: {
+ title: 'Japan At War',
+ author: 'Haruko Taya Cook and Theodore Failor Cook',
+ language: 'English and Japanese',
+ image: 'japan_at_war.jpg',
+ image_alt: 'Japan At War Cover',
+ goodreads: 'https://www.goodreads.com/book/show/31040.Japan_at_War?from_search=true',
+ },
+ the_secret_circle: {
+ title: 'The Secret Circle',
+ author: 'L.J. Smith',
+ language: 'English',
+ image: 'the_secret_circle.jpg',
+ image_alt: 'The Secret Circle: The initiation Cover',
+ goodreads: 'https://www.goodreads.com/book/show/879215.The_Initiation?from_search=true',
+ },
+ basho: {
+ title: 'Basho: The Complete Haiku',
+ author: 'Matsuo Basho',
+ language: 'Japanese and English',
+ image: 'basho.jpg',
+ image_alt: 'Basho Cover',
+ goodreads: 'https://www.goodreads.com/book/show/2183600.Basho?from_search=true',
+ },
+ }
+
+ /* Replace with your own code
+ //console.log(bookTitles);
+
+ let titlesList = document.createElement('ul');
+ document.getElementById('titlesListDiv').appendChild(titlesList); */
+
+ let listDiv = document.createElement('div');
+ listDiv.setAttribute('id', 'titlesListDiv');
+ document.body.appendChild(listDiv);
+
+ function createList(titles) {
+ for (let i = 0; i < titles.length; i++) {
+ let idKey = '' + titles[i] + '';
+ let titleDiv = document.createElement('div');
+ titleDiv.setAttribute('id', idKey);
+ titleDiv.style = 'height: 200px; width: 700px; background-color: tan';
+ document.getElementById('titlesListDiv').appendChild(titleDiv);
+ let goodreadslink = document.createElement('a');
+ goodreadslink.href = booksInfo[idKey].goodreads;
+ goodreadslink.target = '_blank';
+ goodreadslink.setAttribute('id', ('' + idKey + 'grlink'));
+ document.getElementById(idKey).appendChild(goodreadslink);
+ let coverImage = document.createElement("img");
+ coverImage.src = booksInfo[idKey].image;
+ coverImage.alt = booksInfo[idKey].image_alt;
+ coverImage.style = 'height: 200px; width: 145px; float: left; display: inline; margin-right: 20px';
+ document.getElementById('' + idKey + 'grlink').appendChild(coverImage);
+ let headerTitle = document.createElement('h1');
+ headerTitle.style = 'padding-top: 30px';
+ headerTitle.setAttribute('id', '' + idKey + 'header');
+ document.getElementById(idKey).appendChild(headerTitle);
+ document.getElementById('' + idKey + 'header').innerHTML = booksInfo[idKey].title;
+ let otherInfo = document.createElement('p');
+ otherInfo.setAttribute('id', '' + idKey + 'p');
+ document.getElementById(idKey).appendChild(otherInfo);
+ document.getElementById('' + idKey + 'p').innerHTML = 'Author: ' + booksInfo[idKey].author + '
Language: ' + booksInfo[idKey].language;
+
+ /*let li = document.createElement('li');
+ titlesList.appendChild(li);
+ li.id = idKey;
+ document.getElementById(idKey).innerHTML = titles[i];*/
+ }
+ }
+
+ createList(bookTitles);
}
diff --git a/Week1/homework/basho.jpg b/Week1/homework/basho.jpg
new file mode 100644
index 000000000..e108db720
Binary files /dev/null and b/Week1/homework/basho.jpg differ
diff --git a/Week1/homework/bookcase.jpg b/Week1/homework/bookcase.jpg
new file mode 100644
index 000000000..b32fc2b49
Binary files /dev/null and b/Week1/homework/bookcase.jpg differ
diff --git a/Week1/homework/darkness_visible.jpg b/Week1/homework/darkness_visible.jpg
new file mode 100644
index 000000000..d274b4774
Binary files /dev/null and b/Week1/homework/darkness_visible.jpg differ
diff --git a/Week1/homework/dragons_of_autumn_twilight.jpg b/Week1/homework/dragons_of_autumn_twilight.jpg
new file mode 100644
index 000000000..73560534e
Binary files /dev/null and b/Week1/homework/dragons_of_autumn_twilight.jpg differ
diff --git a/Week1/homework/huckleberry_finn.jpg b/Week1/homework/huckleberry_finn.jpg
new file mode 100644
index 000000000..e7d7b1763
Binary files /dev/null and b/Week1/homework/huckleberry_finn.jpg differ
diff --git a/Week1/homework/index.html b/Week1/homework/index.html
index b22147cd1..160ca660d 100644
--- a/Week1/homework/index.html
+++ b/Week1/homework/index.html
@@ -1 +1,13 @@
-
\ No newline at end of file
+
+
+
+