diff --git a/gatsby-node.js b/gatsby-node.js index 65cc939..df4ed4d 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -30,10 +30,44 @@ exports.createPages = ({ boundActionCreators, graphql }) => { previous { title slug + img { + id + childImageSharp { + sizes(maxWidth: 500) { + base64 + tracedSVG + aspectRatio + src + srcSet + srcWebp + srcSetWebp + sizes + originalImg + originalName + } + } + } } next { title slug + img { + id + childImageSharp { + sizes(maxWidth: 500) { + base64 + tracedSVG + aspectRatio + src + srcSet + srcWebp + srcSetWebp + sizes + originalImg + originalName + } + } + } } } } diff --git a/src/components/atoms/ProjectImage.jsx b/src/components/atoms/ProjectImage.jsx index 5ca2323..851db5a 100644 --- a/src/components/atoms/ProjectImage.jsx +++ b/src/components/atoms/ProjectImage.jsx @@ -19,4 +19,12 @@ ProjectImage.propTypes = { alt: PropTypes.string, } +export const projectImage = graphql` + fragment ProjectImageSizes on ImageSharp { + sizes(maxWidth: 1200) { + ...GatsbyImageSharpSizes + } + } +` + export default ProjectImage diff --git a/src/components/atoms/ProjectImage.scss b/src/components/atoms/ProjectImage.scss index f975d3f..8b85199 100644 --- a/src/components/atoms/ProjectImage.scss +++ b/src/components/atoms/ProjectImage.scss @@ -7,8 +7,10 @@ display: block; box-shadow: 0 3px 5px rgba($brand-main, .2), 0 5px 16px rgba($brand-main, .2); - @media (min-width: 1440px) { - max-width: 1440px; + @media (min-width: $projectImageMaxWidth) { + max-width: $projectImageMaxWidth; + border-radius: .25rem; + overflow: hidden; } } diff --git a/src/components/molecules/ProjectNav.jsx b/src/components/molecules/ProjectNav.jsx index d0e2c76..60d7223 100644 --- a/src/components/molecules/ProjectNav.jsx +++ b/src/components/molecules/ProjectNav.jsx @@ -11,7 +11,7 @@ const ProjectNav = ({ previous, next }) => (