Skip to content

Commit fd40d35

Browse files
committed
dinner break
1 parent 72bf94e commit fd40d35

File tree

7 files changed

+270
-2
lines changed

7 files changed

+270
-2
lines changed

gatsby-src/gatsby-config.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
siteMetadata: {
3+
title: `Blah blah fake title`,
4+
},
5+
plugins: [
6+
`gatsby-plugin-glamor`,
7+
{
8+
resolve: `gatsby-source-filesystem`,
9+
options: {
10+
name: `src`,
11+
path: `${__dirname}/src/`,
12+
},
13+
},
14+
{
15+
resolve: `gatsby-plugin-typography`,
16+
options: {
17+
pathToConfigModule: `src/utils/typography`,
18+
},
19+
},
20+
],
21+
};

gatsby-src/package-lock.json

+166
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gatsby-src/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"gatsby-link": "^1.6.37",
1313
"gatsby-plugin-glamor": "^1.6.12",
1414
"gatsby-plugin-typography": "^1.7.14",
15+
"gatsby-source-filesystem": "^1.5.24",
1516
"glamorous": "^4.11.6",
1617
"typography-theme-kirkham": "^0.16.3"
1718
}

gatsby-src/src/layouts/index.js

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
3+
import React from "react";
4+
import g from "glamorous";
5+
import { css } from "glamor";
6+
import Link from "gatsby-link";
7+
8+
import { rhythm } from "../utils/typography";
9+
10+
const linkStyle = css({ float: `right` });
11+
12+
export default ({ children, data }) => (
13+
<g.Div
14+
margin={`0 auto`}
15+
maxWidth={700}
16+
padding={rhythm(2)}
17+
paddingTop={rhythm(1.5)}
18+
>
19+
<Link to={`/`}>
20+
<g.H3
21+
marginBottom={rhythm(2)}
22+
display={`inline-block`}
23+
fontStyle={`normal`}
24+
>
25+
{data.site.siteMetadata.title}
26+
</g.H3>
27+
</Link>
28+
<Link className={linkStyle} to={`/about/`}>
29+
About
30+
</Link>
31+
{children()}
32+
</g.Div>
33+
);
34+
35+
export const query = graphql`
36+
query LayoutQuery {
37+
site {
38+
siteMetadata {
39+
title
40+
}
41+
}
42+
}
43+
`

gatsby-src/src/pages/about.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
3+
export default ({data}) => (
4+
<div>
5+
<h1>About {data.site.siteMetadata.title}</h1>
6+
<p>
7+
We're the only site running on your computer dedicated to showing the best
8+
photos and videos of pandas eating lots of food.
9+
</p>
10+
</div>
11+
);
12+
13+
export const query = graphql`
14+
query AboutQuery {
15+
site {
16+
siteMetadata {
17+
title
18+
}
19+
}
20+
}
21+
`

gatsby-src/src/pages/index.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
import React from "react"
1+
import React from "react";
22

3-
export default () => <div>Hello world!</div>
3+
export default () => (
4+
<div>
5+
<h1>Amazing Pandas Eating Things</h1>
6+
<div>
7+
<img
8+
src="https://2.bp.blogspot.com/-BMP2l6Hwvp4/TiAxeGx4CTI/AAAAAAAAD_M/XlC_mY3SoEw/s1600/panda-group-eating-bamboo.jpg"
9+
alt="Group of pandas eating bamboo"
10+
/>
11+
</div>
12+
</div>
13+
);

gatsby-src/src/utils/typography.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Typography from "typography";
2+
import kirkhamTheme from "typography-theme-kirkham";
3+
4+
const typography = new Typography(kirkhamTheme);
5+
6+
export default typography;

0 commit comments

Comments
 (0)