Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="master.css">
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
</head>
<body>

<div class="container"></div>


<script type="text/javascript" src="main.js"></script>
</body>
</html>
42 changes: 42 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
var books = [
{
title: 'CSS: The Definitive Guide',
author: 'Eric Meyer',
link: 'http://shop.oreilly.com/product/0636920012726.do',
type: 'css',
},
{
title: 'CSS Development with CSS3',
author: 'Zachary Kingston',
link: 'http://shop.oreilly.com/product/0636920057970.do',
type: 'css',
},
{
title: 'You Don\'t Know JS: Up & Going',
author: 'Kyle Simpson',
link: 'http://shop.oreilly.com/product/0636920039303.do',
type: 'js',
},
{
title: 'Programming JavaScript Applications',
author: 'Eric Elliott',
link: 'http://shop.oreilly.com/product/0636920033141.do',
type: 'js',
},
{
title: 'Modern JavaScript',
author: 'unknown',
link: 'http://www.oreilly.com/web-platform/free/modern-javascript.csp',
type: 'js',
}
];
var n = 0;
$.each(books, function(){
$(".container").append("<div class=\"books book" + n + "\"></div>");
$(".book"+ n).append("<h1>"+books[n].title+"</h1>");
$(".book"+ n).append('<div class=\"infos info'+n+'\"></div>')
$(".info"+ n).append("<h3>"+books[n].author + "</h3>");
$(".info"+ n).append("<h3>"+books[n].type + "</h3>");
$(".info"+ n).append("<a href=\""+books[n].link + "\">More</a>");
n = n + 1;
});
50 changes: 50 additions & 0 deletions master.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
*{
margin: 0;
padding: 0;
font-family: futura;
font-weight: 200;
color: white;
text-shadow: 0 0 5px rgba(167, 167, 167, 0.5);
}
body{
display: flex;
align-items: center;
justify-content: space-around;
background-color: rgb(142, 231, 164)
}
.container{
margin: 60px 0;
width: 80vw;
border-top: 2px solid white;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.books h1{
text-align: center;
letter-spacing: 1px;
}
.books{
border-bottom: 2px solid white;
padding: 20px;
}
.books .infos{
height: 0;
opacity: 0;
display: flex;
transition: opacity 1s ease, height 1s ease;
align-items: center;
justify-content: center;
flex-direction: column;
}
.books:hover .infos{
height: 100px;
opacity: 1;
}
a{
text-decoration: none;
background-color: rgb(233, 138, 138);
color: white;
padding: 5px 15px;
box-shadow: 0px 0px 5px rgba(111, 111, 111, 0.6) ;
}