Created
May 12, 2016 01:36
-
-
Save outoftime/d4e3c832d3401c3c0c8b18edebd90732 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=d4e3c832d3401c3c0c8b18edebd90732
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Albums</title> | |
</head> | |
<body> | |
</body> | |
</html> |
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
function addAlbum(object) { | |
var $container = $('<div class="album"></div>'); | |
var $image = $('<img>').attr('src', object.imageURL).appendTo($container); | |
var $title = $('<div class="title"></div>').text(object.title).appendTo($container); | |
var $year = $('<div class="year"></div>').text(object.year).appendTo($container); | |
$('body').append($container); | |
} | |
// PUT YOUR CODE BELOW THIS LINE |
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
.album { | |
max-width: 75%; | |
margin: 0 1em; | |
border: 2px double gray; | |
padding: 1em; | |
} | |
.album img { | |
width: 100%; | |
} | |
.title { | |
font-size: 2em; | |
text-align: center; | |
} | |
.artist { | |
text-align: center; | |
font-style: italic; | |
} | |
.year { | |
text-align: center; | |
color: darkgray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment