Format
This commit is contained in:
parent
1a862b7fab
commit
a9b60609b6
1 changed files with 19 additions and 17 deletions
|
|
@ -10,7 +10,7 @@ class BlogPostTemplate extends React.Component {
|
|||
render() {
|
||||
const post = this.props.data.markdownRemark
|
||||
const siteTitle = get(this.props, 'data.site.siteMetadata.title')
|
||||
const { previous, next } = this.props.pathContext;
|
||||
const { previous, next } = this.props.pathContext
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -34,28 +34,30 @@ class BlogPostTemplate extends React.Component {
|
|||
/>
|
||||
<Bio />
|
||||
|
||||
<ul style={{
|
||||
display: 'flex',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'space-between',
|
||||
listStyle: 'none',
|
||||
padding: 0,
|
||||
}}>
|
||||
{ previous && (
|
||||
<ul
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'space-between',
|
||||
listStyle: 'none',
|
||||
padding: 0,
|
||||
}}
|
||||
>
|
||||
{previous && (
|
||||
<li>
|
||||
<Link to={previous.fields.slug} rel="prev">
|
||||
← {previous.frontmatter.title}
|
||||
</Link>
|
||||
</li>
|
||||
) }
|
||||
)}
|
||||
|
||||
{ next && (
|
||||
<li>
|
||||
<Link to={next.fields.slug} rel="next">
|
||||
{next.frontmatter.title} →
|
||||
</Link>
|
||||
</li>
|
||||
) }
|
||||
{next && (
|
||||
<li>
|
||||
<Link to={next.fields.slug} rel="next">
|
||||
{next.frontmatter.title} →
|
||||
</Link>
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue