Skip to content

Instantly share code, notes, and snippets.

@outoftime
outoftime / README.md
Last active December 17, 2017 23:32
Exported from Popcode. Click to import: https://popcode.org/?gist=de6add53ec3e8f65a1823b4d7cd0f38e

Song Picker

Your goal is to make the song picker fully work. When the title of a song is clicked:

  • That song’s album art should appear
  • The song’s title should be bold

You can check out a fully working demo.

Instructions (Part 1)

@outoftime
outoftime / README.md
Last active December 17, 2017 23:29
Exported from Popcode. Click to import: https://popcode.org/?gist=cb815a31abf77bb7cba7fd909cbe0729

Song Picker

Your goal is to make the song picker fully work. When the title of a song is clicked:

  • That song’s album art should appear
  • The song’s title should be bold

You can check out a fully working demo.

Instructions (Part 1)

function makeMakeEvaluateExpression() {
function makeEvaluateExpression(evalInContext) {
return function(expr) {
return evalInContext(
`({
next: makeEvaluateExpression(function(expr) { return eval(expr); }),
value: eval(${JSON.stringify(expr)})
})`,
);
};
@outoftime
outoftime / index.html
Created December 2, 2017 03:58
Exported from Popcode. Click to import: http://localhost:3000/?gist=5671ae38aa9ee75aa7735a059eeec47f
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
does this all still work
</body>
</html>
@outoftime
outoftime / README.md
Last active November 28, 2017 02:01
Exported from Popcode. Click to import: https://popcode.org/?gist=6b725b3b4f90f2106c3794a7c8020187

Borough Classifier

Add class attributes to the list items. Each list item‘s class attribute should correspond to the borough it’s in. For instance, the first item might have the class manhattan, because Times Square is in Manhattan.

Then, write CSS that gives each borough its own unique style.

Make sure the class attributes you add to your HTML match the class selectors in the CSS exactly!

If you finish early…

@outoftime
outoftime / README.md
Last active December 12, 2017 22:22
Exported from Popcode. Click to import: https://popcode.org/?gist=b015f378916760db44f884f88d7d345d

Borough Classifier

Using the first item as an example, add class attributes to the remaining list items. Each list item‘s class attribute should correspond to the borough it’s in.

Then, finish the CSS by giving each borough its own unique style.

Make sure the class attributes you add to your HTML match the class selectors in the CSS exactly!

Borough Reference

@outoftime
outoftime / README.md
Last active December 12, 2017 22:22
Exported from Popcode. Click to import: https://popcode.org/?gist=07bfb6c6b2f745049452d2e49a910b9e

Borough Classifier

Using the first two items as an example, add class attributes to the remaining list items.

Make sure the class attributes you add to your HTML match the class selectors in the CSS exactly!

If you finish early, add your own styles to the different boroughs.

Borough Reference

<!DOCTYPE html>
<html>
<head>
<title>Classes and IDs Practice</title>
</head>
<body>
<h1>What can Carlton eat?</h1>
<img src="https://pmcvariety.files.wordpress.com/2015/08/alfonso-ribeiro-fresh-prince-of-bel-air.jpg?w=670&h=377&crop=1">
<ul>
<li>Steak</li>
@outoftime
outoftime / README.md
Last active December 12, 2017 02:32
Exported from Popcode. Click to import: https://popcode.org/?gist=9f220011a0e710bce64a38408405dc8f

Subway Line Colors

Give all the subway lines the right color!

Look in the HTML—we have assigned a class corresponding to the subway line color for some of the trains.

First, assign the appropriate class to the rest of the list items. For instance, you should assign the seventh-ave (red) line to the 2 train.

@outoftime
outoftime / README.md
Last active December 12, 2017 02:32
Exported from Popcode. Click to import: https://popcode.org/?gist=1ac169b140edff5167df6c205ecceba3

Subway Line Colors

Give all the subway lines the right color!

Look in the HTML—we have assigned a class corresponding to the subway line color for each individual line.

Start with the Seventh Avenue line, which has the class seventh-ave. Then see how many other lines you can get through!

You do not need to edit the HTML; you only need to add CSS.