Update for latest canary + prettier
This commit is contained in:
parent
b7d1dbf4e1
commit
b23a664df6
20 changed files with 436 additions and 314 deletions
|
|
@ -1,74 +0,0 @@
|
|||
import React from 'react'
|
||||
import { Link } from 'react-router'
|
||||
import { Container } from 'react-responsive-grid'
|
||||
import { prefixLink } from 'gatsby-helpers'
|
||||
import { rhythm, scale } from 'utils/typography'
|
||||
|
||||
class Template extends React.Component {
|
||||
render () {
|
||||
const { location, children } = this.props
|
||||
let header
|
||||
if (location.pathname === prefixLink('/')) {
|
||||
header = (
|
||||
<h1
|
||||
style={{
|
||||
...scale(1.5),
|
||||
marginBottom: rhythm(1.5),
|
||||
marginTop: 0,
|
||||
}}
|
||||
>
|
||||
<Link
|
||||
style={{
|
||||
boxShadow: 'none',
|
||||
textDecoration: 'none',
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={prefixLink('/')}
|
||||
>
|
||||
Gatsby Starter Blog
|
||||
</Link>
|
||||
</h1>
|
||||
)
|
||||
} else {
|
||||
header = (
|
||||
<h3
|
||||
style={{
|
||||
fontFamily: 'Montserrat, sans-serif',
|
||||
marginTop: 0,
|
||||
marginBottom: rhythm(-1),
|
||||
}}
|
||||
>
|
||||
<Link
|
||||
style={{
|
||||
boxShadow: 'none',
|
||||
textDecoration: 'none',
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={prefixLink('/')}
|
||||
>
|
||||
Gatsby Starter Blog
|
||||
</Link>
|
||||
</h3>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<Container
|
||||
style={{
|
||||
maxWidth: rhythm(24),
|
||||
padding: `${rhythm(1.5)} ${rhythm(3/4)}`,
|
||||
}}
|
||||
>
|
||||
{header}
|
||||
{children}
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Template.propTypes = {
|
||||
children: React.PropTypes.any,
|
||||
location: React.PropTypes.object,
|
||||
route: React.PropTypes.object,
|
||||
}
|
||||
|
||||
export default Template
|
||||
Loading…
Add table
Add a link
Reference in a new issue