diff --git a/src/components/Index/HeroImage.js b/src/components/Index/HeroImage.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/IndexComponents.js b/src/components/Index/HeroLink.js similarity index 99% rename from src/components/IndexComponents.js rename to src/components/Index/HeroLink.js index 5de5f03..e3a5044 100644 --- a/src/components/IndexComponents.js +++ b/src/components/Index/HeroLink.js @@ -13,4 +13,4 @@ export const HeroA = ({ href={href} {...linkProps} >{children} -); +); \ No newline at end of file diff --git a/src/pages/index.js b/src/pages/index.js index c94ae87..bbf453a 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -6,8 +6,8 @@ import { take } from 'ramda'; import classnames from 'classnames'; import posthog from 'posthog-js'; -import { getVibrantToHelmetSafeBodyStyle, getVibrant } from '../utils'; -import { HeroA } from '../components/IndexComponents'; +import { getVibrantToHelmetSafeBodyStyle, getVibrant, getAspectRatio } from '../utils'; +import { HeroA } from '../components/Index/HeroLink'; // TODO: better text colors in situations of low contrast @@ -81,6 +81,7 @@ const IndexPage = ({ data: { allFile: { edges } } }) => { }, [imageIndex, images.length]); const vibrant = getVibrant(image); + const ar = getAspectRatio(image); return (<> Chuck Dries @@ -90,13 +91,13 @@ const IndexPage = ({ data: { allFile: { edges } } }) => { />
1 ? 'flex md:grid flex-col' : 'grid md:flex md:flex-row-reverse')} > {isClient ? 1 ? 'md:h-screen h-two-thirds-vw' : 'h-screen w-full md:w-1/2', )} image={getImage(image)} loading="eager" @@ -176,8 +177,8 @@ export const query = graphql` filter: { sourceInstanceName: {eq: "gallery"}, # images that don't work well - base: {nin: ["DSC06517.jpg"]} - childrenImageSharp: {elemMatch: {fluid: {aspectRatio: {gte: 1.4}}}} + # base: {nin: ["DSC06517.jpg"]} + # childrenImageSharp: {elemMatch: {fluid: {aspectRatio: {lte: 1.3}}}} } ) { edges { @@ -185,6 +186,9 @@ export const query = graphql` relativePath base childImageSharp { + fluid { + aspectRatio + } gatsbyImageData( layout: FULL_WIDTH placeholder: NONE