Update packages and run prettier
This commit is contained in:
parent
6bc49591c3
commit
8f03c8589e
6 changed files with 63 additions and 65 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import React from "react"
|
||||
import React from 'react'
|
||||
|
||||
// Import typefaces
|
||||
import "typeface-montserrat"
|
||||
import "typeface-merriweather"
|
||||
import 'typeface-montserrat'
|
||||
import 'typeface-merriweather'
|
||||
|
||||
import profilePic from "./profile-pic.jpg"
|
||||
import { rhythm } from "../utils/typography"
|
||||
import profilePic from './profile-pic.jpg'
|
||||
import { rhythm } from '../utils/typography'
|
||||
|
||||
class Bio extends React.Component {
|
||||
render() {
|
||||
|
|
@ -19,19 +19,15 @@ class Bio extends React.Component {
|
|||
src={profilePic}
|
||||
alt={`Kyle Mathews`}
|
||||
style={{
|
||||
float: "left",
|
||||
float: 'left',
|
||||
marginRight: rhythm(1 / 4),
|
||||
marginBottom: 0,
|
||||
width: rhythm(2),
|
||||
height: rhythm(2),
|
||||
}}
|
||||
/>
|
||||
Written by
|
||||
{" "}
|
||||
<strong>Kyle Mathews</strong>
|
||||
{" "}
|
||||
who lives and works in San Francisco building useful things.
|
||||
{" "}
|
||||
Written by <strong>Kyle Mathews</strong> who lives and works in San
|
||||
Francisco building useful things.{' '}
|
||||
<a href="https://twitter.com/kylemathews">
|
||||
You should follow him on Twitter
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react"
|
||||
import { TypographyStyle } from "react-typography"
|
||||
import React from 'react'
|
||||
import { TypographyStyle } from 'react-typography'
|
||||
|
||||
import typography from "./utils/typography"
|
||||
import typography from './utils/typography'
|
||||
|
||||
let stylesStr
|
||||
if (process.env.NODE_ENV === `production`) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import React from "react"
|
||||
import Link from "gatsby-link"
|
||||
import { Container } from "react-responsive-grid"
|
||||
import React from 'react'
|
||||
import Link from 'gatsby-link'
|
||||
import { Container } from 'react-responsive-grid'
|
||||
|
||||
import { rhythm, scale } from "../utils/typography"
|
||||
import { rhythm, scale } from '../utils/typography'
|
||||
|
||||
class Template extends React.Component {
|
||||
render() {
|
||||
const { location, children } = this.props
|
||||
let header
|
||||
if (location.pathname === "/") {
|
||||
if (location.pathname === '/') {
|
||||
header = (
|
||||
<h1
|
||||
style={{
|
||||
|
|
@ -19,11 +19,11 @@ class Template extends React.Component {
|
|||
>
|
||||
<Link
|
||||
style={{
|
||||
boxShadow: "none",
|
||||
textDecoration: "none",
|
||||
color: "inherit",
|
||||
boxShadow: 'none',
|
||||
textDecoration: 'none',
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={"/"}
|
||||
to={'/'}
|
||||
>
|
||||
Gatsby Starter Blog
|
||||
</Link>
|
||||
|
|
@ -33,18 +33,18 @@ class Template extends React.Component {
|
|||
header = (
|
||||
<h3
|
||||
style={{
|
||||
fontFamily: "Montserrat, sans-serif",
|
||||
fontFamily: 'Montserrat, sans-serif',
|
||||
marginTop: 0,
|
||||
marginBottom: rhythm(-1),
|
||||
}}
|
||||
>
|
||||
<Link
|
||||
style={{
|
||||
boxShadow: "none",
|
||||
textDecoration: "none",
|
||||
color: "inherit",
|
||||
boxShadow: 'none',
|
||||
textDecoration: 'none',
|
||||
color: 'inherit',
|
||||
}}
|
||||
to={"/"}
|
||||
to={'/'}
|
||||
>
|
||||
Gatsby Starter Blog
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
import React from "react"
|
||||
import Link from "gatsby-link"
|
||||
import get from "lodash/get"
|
||||
import Helmet from "react-helmet"
|
||||
import React from 'react'
|
||||
import Link from 'gatsby-link'
|
||||
import get from 'lodash/get'
|
||||
import Helmet from 'react-helmet'
|
||||
|
||||
import Bio from "../components/Bio"
|
||||
import { rhythm } from "../utils/typography"
|
||||
import Bio from '../components/Bio'
|
||||
import { rhythm } from '../utils/typography'
|
||||
|
||||
class BlogIndex extends React.Component {
|
||||
render() {
|
||||
// console.log("props", this.props)
|
||||
const pageLinks = []
|
||||
const siteTitle = get(this, "props.data.site.siteMetadata.title")
|
||||
const posts = get(this, "props.data.allMarkdownRemark.edges")
|
||||
const siteTitle = get(this, 'props.data.site.siteMetadata.title')
|
||||
const posts = get(this, 'props.data.allMarkdownRemark.edges')
|
||||
posts.forEach(post => {
|
||||
if (post.node.path !== "/404/") {
|
||||
const title = get(post, "node.frontmatter.title") || post.node.path
|
||||
if (post.node.path !== '/404/') {
|
||||
const title = get(post, 'node.frontmatter.title') || post.node.path
|
||||
pageLinks.push(
|
||||
<li
|
||||
key={post.node.frontmatter.path}
|
||||
|
|
@ -22,7 +22,7 @@ class BlogIndex extends React.Component {
|
|||
marginBottom: rhythm(1 / 4),
|
||||
}}
|
||||
>
|
||||
<Link style={{ boxShadow: "none" }} to={post.node.frontmatter.path}>
|
||||
<Link style={{ boxShadow: 'none' }} to={post.node.frontmatter.path}>
|
||||
{post.node.frontmatter.title}
|
||||
</Link>
|
||||
</li>
|
||||
|
|
@ -32,7 +32,7 @@ class BlogIndex extends React.Component {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<Helmet title={get(this, "props.data.site.siteMetadata.title")} />
|
||||
<Helmet title={get(this, 'props.data.site.siteMetadata.title')} />
|
||||
<Bio />
|
||||
<ul>
|
||||
{pageLinks}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import React from "react"
|
||||
import Helmet from "react-helmet"
|
||||
import Link from "gatsby-link"
|
||||
import get from "lodash/get"
|
||||
import React from 'react'
|
||||
import Helmet from 'react-helmet'
|
||||
import Link from 'gatsby-link'
|
||||
import get from 'lodash/get'
|
||||
|
||||
import Bio from "../components/Bio"
|
||||
import { rhythm, scale } from "../utils/typography"
|
||||
import Bio from '../components/Bio'
|
||||
import { rhythm, scale } from '../utils/typography'
|
||||
|
||||
class BlogPostTemplate extends React.Component {
|
||||
render() {
|
||||
const post = this.props.data.markdownRemark
|
||||
const siteTitle = get(this.props, "data.site.siteMetadata.title")
|
||||
const siteTitle = get(this.props, 'data.site.siteMetadata.title')
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -20,7 +20,7 @@ class BlogPostTemplate extends React.Component {
|
|||
<p
|
||||
style={{
|
||||
...scale(-1 / 5),
|
||||
display: "block",
|
||||
display: 'block',
|
||||
marginBottom: rhythm(1),
|
||||
marginTop: rhythm(-1),
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue