Commit 51f14768 authored by Seth A Johnson's avatar Seth A Johnson
Browse files

book covers past 2

parent 1f4368f8
......@@ -14,13 +14,13 @@ const Book = ({book}) => {
return (
<div className="card mb-3 lever-card">
<div className="row no-gutters">
<div class="col-md-4">
<div className="col-md-4">
<Img fluid={cover.childImageSharp.fluid}
alt={`cover of ${title}`}
className="card-img"
/>
</div>
<div class="col-md-8">
<div className="col-md-8">
<div className="card-body">
<h5 className="card-title">{title}</h5>
<h6 className="card-subtitle text-muted">{author}</h6>
......
......@@ -3,11 +3,15 @@ import Img from "gatsby-image"
const BookCover = ({book}) => {
return (
<div>
<Img fluid={book.cover.childImageSharp.fluid}
alt={`cover of ${book.title}`}
className="card-img"
/>
<div className="card mb-3 lever-card">
<div className="row no-gutters">
<div className="col-md-12">
<Img fluid={book.cover.childImageSharp.fluid}
alt={`cover of ${book.title}`}
className="cover-only-img"
/>
</div>
</div>
</div>
)
}
......
......@@ -5,22 +5,29 @@ import BookCover from "./bookCover"
const BookList = ({books}) => {
return (
<div className="row lever-card-list">
{
books.map(({node}) => {
console.log(node);
if (node.frontmatter.orderOnPage === 1 || node.frontmatter.orderOnPage === 2) {
console.log(node);
return (
<BookCard key={node.id} book={node.frontmatter} />
)
} else {
return (
<BookCover key={node.id} book={node.frontmatter} />
)
}
})
}
<div>
<div className="row lever-card-list">
{
books.map(({node}) => {
if (node.frontmatter.orderOnPage === 1 || node.frontmatter.orderOnPage === 2) {
return (
<BookCard key={node.id} book={node.frontmatter} />
)
}
})
}
</div>
<div className="row lever-card-list">
{
books.map(({node}) => {
if (node.frontmatter.orderOnPage > 2) {
return (
<BookCover key={node.id} book={node.frontmatter} />
)
}
})
}
</div>
</div>
)
}
......
......@@ -33,9 +33,14 @@
.card-img {
border-radius: 0;
}
.cover-only-img {
min-width: 200px;
}
}
}
.tagline-newsletter-container {
padding: 4rem 0;
border-bottom: 1px solid rgba(0,0,0,.125);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment