query hero bg imgs by aspect instead of exclusion list

This commit is contained in:
Chuck Dries 2021-06-17 00:31:44 -07:00
parent 8ec8b011b2
commit 958dd88bd6
2 changed files with 6 additions and 5 deletions

View File

@ -36,7 +36,7 @@ const GalleryImage = ({ data }) => {
style={getVibrantToHelmetSafeBodyStyle(vibrant)} style={getVibrantToHelmetSafeBodyStyle(vibrant)}
/> />
</Helmet> </Helmet>
<Link className="underline text-vibrant-light arrow-left-before" to="/photogallery">back</Link> <Link className="underline text-vibrant-light arrow-left-before absolute" to="/photogallery">back</Link>
<div className="min-h-screen flex flex-col justify-center"> <div className="min-h-screen flex flex-col justify-center">
<div className={classnames('flex mx-auto', ar > 1 ? 'flex-col' : 'flex-row-reverse')} style={{ margin: '0 5vw' }}> <div className={classnames('flex mx-auto', ar > 1 ? 'flex-col' : 'flex-row-reverse')} style={{ margin: '0 5vw' }}>
<div className="flex-grow-0"> <div className="flex-grow-0">
@ -82,7 +82,7 @@ export const query = graphql`
# placeholder: BLURRED # placeholder: BLURRED
placeholder: DOMINANT_COLOR placeholder: DOMINANT_COLOR
# placeholder: TRACED_SVG # placeholder: TRACED_SVG
height: 2048 height: 2160
) )
fields { fields {
imageMeta { imageMeta {

View File

@ -36,7 +36,7 @@ const IndexPage = ({ data: { allFile: { edges } } }) => {
<GatsbyImage <GatsbyImage
alt="" alt=""
className={classnames( className={classnames(
'md:h-screen hero-img sm:h-auto', 'md:h-screen sm:h-two-thirds-vw',
)} )}
image={getImage(image)} image={getImage(image)}
loading="eager" loading="eager"
@ -74,7 +74,6 @@ const IndexPage = ({ data: { allFile: { edges } } }) => {
Photo Gallery</Link> Photo Gallery</Link>
</div> </div>
</div> </div>
<div id="asdf" style={{ display: 'block'}}></div>
</main> </main>
</>); </>);
}; };
@ -84,7 +83,9 @@ export const query = graphql`
allFile( allFile(
filter: { filter: {
sourceInstanceName: {eq: "gallery"}, sourceInstanceName: {eq: "gallery"},
base: {nin: ["DSC01699.jpg", "DSC02981.jpg", "_DSC4155.jpg", "DSC02538.jpg", "DSC05851.jpg"]} # base: {nin: ["DSC01699.jpg", "DSC02981.jpg", "_DSC4155.jpg", "DSC02538.jpg", "DSC05851.jpg"]}
# no vertical images
childrenImageSharp: {elemMatch: {fluid: {aspectRatio: {gte: 1.4}}}}
} }
) { ) {
edges { edges {