-
-
Save cferdinandi/dc0686a396cc2a2d2cb7e295b4d2a62c to your computer and use it in GitHub Desktop.
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> | |
<meta charset="utf-8"> | |
<title>Monsters!</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style type="text/css"> | |
body { | |
margin: 0 auto; | |
max-width: 40em; | |
width: 88%; | |
} | |
/** | |
* A simple grid layout | |
*/ | |
.row { | |
display: grid; | |
grid-template-columns: auto auto auto; | |
text-align: center; | |
} | |
.grid { | |
min-height: 6em; | |
padding: 1em; | |
} | |
/** | |
* Make sure images scale | |
*/ | |
img { | |
height: auto; | |
max-width: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Monsters!</h1> | |
<div id="app"></div> | |
<footer> | |
<hr> | |
<p class="text-small text-muted">Icons by <a href="https://thenounproject.com/term/door/311732/">Jamie Dickinson</a>, <a href="https://thenounproject.com/term/monster/184225/">Nicky Knicky</a>, <a href="https://thenounproject.com/term/monster/1510400/">Alvaro Cabrera</a>, <a href="https://thenounproject.com/term/monster/28460/">Eliricon</a>, <a href="https://thenounproject.com/term/monster/82823/">April Yang</a>, <a href="https://thenounproject.com/term/monster/1062009/">tk66</a>, <a href="https://thenounproject.com/term/monster/24990/">Alex WaZa</a>, <a href="https://thenounproject.com/term/monster/37212/">Husein Aziz</a>, <a href="https://thenounproject.com/term/monster/2236082">iconcheese</a>, and <a href="https://thenounproject.com/term/socks/38451/">Yazmin Alanis</a>.</p> | |
</footer> | |
<script> | |
// The monsters and socks | |
let monsters = [ | |
'monster1', | |
'monster2', | |
'monster3', | |
'monster4', | |
'monster5', | |
'monster6', | |
'monster7', | |
'monster8', | |
'monster9', | |
'monster10', | |
'monster11', | |
'sock' | |
]; | |
// Your code goes here... | |
</script> | |
</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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Oops, you found a sock!</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
</head> | |
<body> | |
<p><img class="img-full" alt="" src="https://media.giphy.com/media/13zUNhE9WZspMc/giphy.gif"></p> | |
<h1>Oops, you found a sock!</h1> | |
<p> | |
<a class="btn" href="index.html">Play Again</a> | |
</p> | |
</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
// The monsters and socks | |
let monsters = [ | |
{ | |
name: 'monster1', | |
alt: 'A yellow monster with a curly nose' | |
}, | |
{ | |
name: 'monster2', | |
alt: 'A yellow monster with a wide head, one eye, and an underbite' | |
}, | |
{ | |
name: 'monster3', | |
alt: 'A green monster with eyes on stalks and a mouth at the top of its head' | |
}, | |
{ | |
name: 'monster4', | |
alt: 'A red monster with horns, four eyes, and no legs' | |
}, | |
{ | |
name: 'monster5', | |
alt: 'A green monster with three horns on each side of its head, one eye, and a sad look on its face' | |
}, | |
{ | |
name: 'monster6', | |
alt: 'A green, triangle-shaped monster with sharp teeth, walking upside-down on its hands' | |
}, | |
{ | |
name: 'monster7', | |
alt: 'A purple monster with a single, sad looking eye and tentacles for arms' | |
}, | |
{ | |
name: 'monster8', | |
alt: 'A purple, oval-shaped monster with one eye and no arms or legs' | |
}, | |
{ | |
name: 'monster9', | |
alt: 'A blue, insect-like monster, with bug eyes, three body sections, and a pair of wings' | |
}, | |
{ | |
name: 'monster10', | |
alt: 'A blue monster with lopsided eyes on stalks and long, sharp teeth' | |
}, | |
{ | |
name: 'monster11', | |
alt: 'A furry gray monster with long arms and a happy face' | |
}, | |
{ | |
name: 'sock', | |
alt: 'A pair of athletic socks' | |
} | |
]; |
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> | |
<meta charset="utf-8"> | |
<title>You Won!</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
</head> | |
<body> | |
<p><img class="img-full" alt="" src="https://media.giphy.com/media/1242bJFCbb3FxC/giphy.gif"></p> | |
<h1>You won!</h1> | |
<p>You found all of the monsters. Congrats!</p> | |
<p> | |
<a class="btn" href="index.html">Play Again</a> | |
</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment