From 769a18fdb7c15d01a68f0dbbc6ff629acbc9695c Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Tue, 15 Jun 2021 06:04:10 -0700 Subject: [PATCH] hero image on landing page --- gatsby/src/pages/index.js | 133 +++++++++++------------------------ gatsby/src/styles/global.css | 8 +++ 2 files changed, 50 insertions(+), 91 deletions(-) diff --git a/gatsby/src/pages/index.js b/gatsby/src/pages/index.js index e574225..0c0ad40 100644 --- a/gatsby/src/pages/index.js +++ b/gatsby/src/pages/index.js @@ -1,100 +1,51 @@ import * as React from 'react'; -import { graphql, Link } from 'gatsby'; -import { GatsbyImage, getImage } from 'gatsby-plugin-image'; - -// markup -const IndexPage = ({ data }) => { - const images = React.useMemo(() => data.allFile.edges.map(edge => edge.node), [data]); - console.log('images', images); +import { Link } from 'gatsby'; +import { StaticImage } from 'gatsby-plugin-image'; +const IndexPage = () => { return ( -
-
-
-

Chuck Dries

-

Software Engineer in web & VR

- +
+ +
+
+
+
+

Chuck Dries

+

Full stack software engineer & hobbyist photographer

+ +
+
+ + Photography
-
-
-

Photography

-
- {images.map(image => { - const name = image.childImageSharp.fields.imageMeta.iptc.object_name || image.base; - console.log('name', name); - // const file = data.allFile - // console.log(fileName) - // return <> - return ( - //
- // . - - //
- ); - })} -
-
+
); }; -export const query = graphql` -query HomePageGallery { - allFile(filter: { - sourceInstanceName: { eq: "gallery" }} - sort: {order: DESC, fields: childrenImageSharp___fields___imageMeta___dateTaken} - ) { - edges { - node { - relativePath, - base, - childImageSharp{ - gatsbyImageData( - layout: CONSTRAINED, - placeholder: DOMINANT_COLOR, - # width: 400 - # height: 900 - height: 600 - ) - fields { - imageMeta { - dateTaken - iptc { - caption - object_name - } - exif { - FNumber - ExposureTime - ShutterSpeedValue - ISO - } - } - } - } - } - } - } -}`; - export default IndexPage; diff --git a/gatsby/src/styles/global.css b/gatsby/src/styles/global.css index f0f4c36..3b57012 100644 --- a/gatsby/src/styles/global.css +++ b/gatsby/src/styles/global.css @@ -43,3 +43,11 @@ h3 { a { @apply text-blue-600; } + +.arrow-after:after { + content: "\279C"; + margin-left: 3px; + transform: translate(0px); + display: inline-block; + transition: all .2s; +}