Skip to content

Commit

Permalink
Ana sayfaya fotoğraflar eklendi
Browse files Browse the repository at this point in the history
  • Loading branch information
e-demir committed May 28, 2020
1 parent 0e11369 commit e490ab4
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 9 deletions.
17 changes: 12 additions & 5 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
author: `@gatsbyjs`,
title: `Gatsby Gagarin`,
description: `First project with Gatsby, a site about universe and cosmos`,
author: `@e-demir`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
name: `photos`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/photos`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
Expand Down
10 changes: 10 additions & 0 deletions src/pages/index.css
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;
}
34 changes: 30 additions & 4 deletions src/pages/index.js
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
Binary file added src/photos/adam-miller-dBaz0xhCkPY-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/photos/greg-rakozy-oMpAz-DN-9I-unsplash.jpg
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.
Binary file added src/photos/juskteez-vu-TIrXot28Znc-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/photos/nasa-Yj1M5riCKk4-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/photos/nasa-yZygONrUBe8-unsplash.jpg
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.

1 comment on commit e490ab4

@vercel
Copy link

@vercel vercel bot commented on e490ab4 May 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.