-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.photos{ | ||
display: grid; | ||
grid-template-columns: repeat(4,1fr); | ||
gap: 30px ; | ||
} | ||
h1{ | ||
text-align: center; | ||
font-size: 70px; | ||
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
import React from "react" | ||
import { graphql } from "gatsby" | ||
import Img from "gatsby-image" | ||
import './index.css' | ||
|
||
const IndexPage = () => ( | ||
<div> | ||
const IndexPage = ({ data }) => { | ||
console.log(data) | ||
return <div> | ||
<h1>This page is about cosmos news!</h1> | ||
|
||
<div className="photos"> | ||
{data.allFile.edges.map(({ node }) => { | ||
return <Img key={node.id} fluid={node.childImageSharp.fluid} /> | ||
})} | ||
</div> | ||
</div> | ||
) | ||
} | ||
export const pageQuery = graphql` | ||
query MyQuery { | ||
allFile(filter: {absolutePath: {regex: "/photos/"}}) { | ||
edges { | ||
node { | ||
id | ||
childImageSharp{ | ||
fluid{ | ||
...GatsbyImageSharpFluid | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
` | ||
|
||
export default IndexPage | ||
export default IndexPage |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
e490ab4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: