Skip to content

Instantly share code, notes, and snippets.

@outoftime
Created May 12, 2016 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save outoftime/d4e3c832d3401c3c0c8b18edebd90732 to your computer and use it in GitHub Desktop.
Save outoftime/d4e3c832d3401c3c0c8b18edebd90732 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=d4e3c832d3401c3c0c8b18edebd90732
<!DOCTYPE html>
<html>
<head>
<title>Albums</title>
</head>
<body>
</body>
</html>
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
.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