Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bring in books json object for more dynamic bookshelf
- Loading branch information
Kristen Hazard
committed
Jan 22, 2012
1 parent
dbb9b4a
commit a8d4863
Showing
3 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,173 @@ | ||
var books_o = { | ||
"books": | ||
[ | ||
{ | ||
"title": "The Hunger Games", | ||
"author": "Suzanne Collins", | ||
"genre": "Science Fiction & Fantasy", | ||
"published_date": "Sep 14, 2008", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/05lf46v?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Catching Fire", | ||
"author": "Suzanne Collins", | ||
"genre": "Science Fiction & Fantasy", | ||
"published_date": "2009", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/05pr8ql?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Mocking Jay", | ||
"author": "Suzanne Collins", | ||
"genre": "Science Fiction & Fantasy", | ||
"published_date": "2010", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/0bc62yj?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "The Girl with the Dragon Tattoo", | ||
"author": "Stieg Larsson", | ||
"genre": "Thriller", | ||
"published_date": "2005", | ||
"cover_url": "http://ecx.images-amazon.com/images/I/51aAKu3FqmL._SL160_.jpg" | ||
}, | ||
{ | ||
"title": "The Girl Who Played with Fire", | ||
"author": "Stieg Larsson", | ||
"genre": "Thriller", | ||
"published_date": "2006", | ||
"cover_url": "http://ecx.images-amazon.com/images/I/51%2B02nxk21L._SL160_.jpg" | ||
}, | ||
{ | ||
"title": "The Girl Who Kicked the Hornets' Nest", | ||
"author": "Stieg Larsson", | ||
"genre": "Thriller", | ||
"published_date": "2007", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/0c04yhr?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Harry Potter and the Half-Blood Prince", | ||
"author": "J. K. Rowling", | ||
"genre": "Fantasy", | ||
"published_date": "2005", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/02cb_2l?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Harry Potter and the Deathly Hallows", | ||
"author": "J. K. Rowling", | ||
"genre": "Fantasy", | ||
"published_date": "2007", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/03tg9k8?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Harry Potter and the Goblet of Fire", | ||
"author": "J. K. Rowling", | ||
"genre": "Fantasy", | ||
"published_date": "2000", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/065h575?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Harry Potter and the Order of the Phoenix", | ||
"author": "J. K. Rowling", | ||
"genre": "Fantasy", | ||
"published_date": "2003", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/029n3v1?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Harry Potter and the Philosopher's Stone", | ||
"author": "J. K. Rowling", | ||
"genre": "Fantasy", | ||
"published_date": "1997", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/029jx4c?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Harry Potter and the Prisoner of Azkaban", | ||
"author": "J. K. Rowling", | ||
"genre": "Fantasy", | ||
"published_date": "1999", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/029rgch?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Harry Potter and the Chamber of Secrets", | ||
"author": "J. K. Rowling", | ||
"genre": "Fantasy", | ||
"published_date": "1998", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/029nf5h?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Steve Jobs: A Biography", | ||
"author": "Walter Isaacson", | ||
"genre": "Biography", | ||
"published_date": "2011", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/0hnjjkh?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Einstein: His Life and Universe", | ||
"author": "Walter Isaacson", | ||
"genre": "Biography", | ||
"published_date": "2007", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/04x3hbm?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Benjamin Franklin: An American Life", | ||
"author": "Walter Isaacson", | ||
"genre": "Biography", | ||
"published_date": "2003", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/04x3hh0?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "On Writing: A Memoir of the Craft", | ||
"author": "Stephen King", | ||
"genre": "Autobiography", | ||
"published_date": "2000", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/029kgkz?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "American Gods, Neil Gaiman", | ||
"author": "Neil Gaiman", | ||
"genre": "Science Fiction", | ||
"published_date": "2001", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/029p8fg?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Just Kids", | ||
"author": "Patti Smith", | ||
"genre": "Memoir", | ||
"published_date": "2010", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/0g5148p?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "The History of Love", | ||
"author": "Nicole Krauss", | ||
"genre": "Fiction", | ||
"published_date": "2005", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/03r0ffq?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "The Lacuna", | ||
"author": "Barbara Kingsolver", | ||
"genre": "Fiction", | ||
"published_date": "2009", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/09rhr22?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "The Poisonwood Bible", | ||
"author": "Barbara Kingsolver", | ||
"genre": "Fiction", | ||
"published_date": "1998", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/02b5z6s?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "The Bean Trees", | ||
"author": "Barbara Kingsolver", | ||
"genre": "Fiction", | ||
"published_date": "1988", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/02bl977?maxheight=510&mode=fit&maxwidth=510" | ||
}, | ||
{ | ||
"title": "Their Eyes Were Watching God", | ||
"author": "Zora Neale Hurston", | ||
"genre": "Fiction", | ||
"published_date": "1937", | ||
"cover_url": "http://img.freebase.com/api/trans/image_thumb/m/029r3l8?maxheight=510&mode=fit&maxwidth=510" | ||
} | ||
] | ||
} |
This file contains 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,7 @@ | ||
$(function () { | ||
$book_rows = $('div.book'); | ||
$book_rows.each(function(index) { | ||
console.log($(this).find('img')); | ||
$(this).find('img')[0].src = books_o["books"][index]["cover_url"] | ||
}); | ||
}); |
Empty file.