From bf377298eec859c8b1b24053b209bb6f1040f12b Mon Sep 17 00:00:00 2001 From: Rien Date: Sat, 8 Sep 2018 23:13:35 +0200 Subject: [PATCH 1/3] update showcase list layout --- www/src/views/shared/styles.js | 9 ++++----- www/src/views/shared/thumbnail.js | 10 +++++----- www/src/views/starter-showcase/filtered-showcase.js | 10 +--------- www/src/views/starter-showcase/showcase-list.js | 11 ++--------- 4 files changed, 12 insertions(+), 28 deletions(-) diff --git a/www/src/views/shared/styles.js b/www/src/views/shared/styles.js index 8a76f049df5a7..46a4001becb81 100644 --- a/www/src/views/shared/styles.js +++ b/www/src/views/shared/styles.js @@ -26,16 +26,15 @@ const styles = { display: `flex`, flexWrap: `wrap`, padding: rhythm(3 / 4), - justifyContent: `center`, - [presets.Desktop]: { - justifyContent: `flex-start`, - }, + justifyContent: `space-evenly`, }, showcaseItem: { display: `flex`, flexDirection: `column`, margin: rhythm(3 / 4), - width: 282, + minWidth: 259,//shows 3 items/row on windows > 1200px wide + maxWidth: 350, + flex: `1 0 0`, position: `relative`, }, featuredItem: { diff --git a/www/src/views/shared/thumbnail.js b/www/src/views/shared/thumbnail.js index 8b681b36c337a..fcbd4c750bb0f 100644 --- a/www/src/views/shared/thumbnail.js +++ b/www/src/views/shared/thumbnail.js @@ -10,10 +10,10 @@ const ThumbnailLink = ({ slug, image, title, children }) => { // site showcase if (image.screenshotFile) { - screenshot = image.screenshotFile.childImageSharp.fixed + screenshot = image.screenshotFile.childImageSharp.fluid } else { // starter showcase - screenshot = image.childImageSharp.fixed + screenshot = image.childImageSharp.fluid } return ( @@ -37,7 +37,7 @@ const ThumbnailLink = ({ slug, image, title, children }) => { > {screenshot ? ( {`Screenshot @@ -60,8 +60,8 @@ export default ThumbnailLink export const showcaseThumbnailFragment = graphql` fragment ShowcaseThumbnailFragment_item on ImageSharp { - fixed(width: 282, height: 211) { - ...GatsbyImageSharpFixed_noBase64 + fluid(maxWidth: 350) { + ...GatsbyImageSharpFluid_noBase64 } } ` diff --git a/www/src/views/starter-showcase/filtered-showcase.js b/www/src/views/starter-showcase/filtered-showcase.js index 418d6b7f4f570..1e1bb900c0de9 100644 --- a/www/src/views/starter-showcase/filtered-showcase.js +++ b/www/src/views/starter-showcase/filtered-showcase.js @@ -334,15 +334,7 @@ export default class FilteredShowcase extends Component {