Skip to content

Commit

Permalink
Add prototypes for schemas for images and PDFs
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Oct 27, 2016
1 parent 8bf302f commit 2d2c048
Show file tree
Hide file tree
Showing 12 changed files with 441 additions and 767 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ test/**/public
.gatsby-context.js
.DS_Store
public/
node_modules/
2 changes: 1 addition & 1 deletion examples/image-gallery/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'path'
exports.createPages = ({ graphql }) => (
new Promise((resolve, reject) => {
const pages = []
const imagePage = path.resolve('templates/image-page.js')
const imagePage = path.resolve('pages/image-page.js')
graphql(`
{
allImages(first: 1000) {
Expand Down
1 change: 0 additions & 1 deletion examples/image-gallery/pages/image-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ImagePage extends React.Component {
}

render () {
console.log(this.props)
const {regular, retina, micro} = this.props.data.image
return (
<div>
Expand Down
5 changes: 2 additions & 3 deletions examples/image-gallery/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {rhythm} from 'utils/typography'
import Link from 'react-router/lib/Link'

const ImageIndex = (props) => {
console.log(props)
return (
<div>
{props.data.allImages.edges.map((edge) => {
Expand Down Expand Up @@ -40,12 +39,12 @@ query allImages {
edges {
node {
path
regular: image(width: 290) {
regular: image(height: 290, width: 387) {
src
height
width
}
retina: image(width: 580) {
retina: image(height: 580, width: 794) {
src
}
}
Expand Down
Loading

0 comments on commit 2d2c048

Please sign in to comment.