Skip to content

Commit 041a56e

Browse files
authored
Merge pull request #1194 from ethereum/fix-callout-cutoff
Fix callout cutoff
2 parents 68d7688 + 3325984 commit 041a56e

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

src/components/Callout.js

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,24 @@ const Description = styled.p`
2727
`
2828

2929
const Image = styled(Img)`
30-
align-self: center;
31-
width: 100%;
32-
height: 100%;
33-
max-width: ${(props) => props.maxImageWidth};
3430
margin-top: -10rem;
31+
align-self: center;
32+
max-width: 263px;
33+
min-height: 200px;
3534
`
3635

3736
const Content = styled.div`
37+
margin-top: 2.5rem;
3838
display: flex;
3939
flex-direction: column;
4040
justify-content: space-between;
4141
height: 100%;
42-
margin-top: 2.5rem;
4342
`
4443

45-
const Callout = ({
46-
image,
47-
maxImageWidth,
48-
title,
49-
description,
50-
children,
51-
className,
52-
}) => {
44+
const Callout = ({ image, title, description, children, className }) => {
5345
return (
5446
<StyledCard className={className}>
55-
<Image
56-
fluid={image}
57-
alt={`${title} image`}
58-
maxImageWidth={maxImageWidth}
59-
/>
47+
<Image fixed={image} alt={`${title} image`} />
6048
<Content>
6149
<div>
6250
<h3>{title}</h3>

src/pages/what-is-ethereum.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,7 @@ const WhatIsEthereumPage = ({ data }) => {
426426
<Content>
427427
<CardContainer>
428428
<StyledCallout
429-
image={data.developers.childImageSharp.fluid}
430-
maxImageWidth={"320px"}
429+
image={data.developers.childImageSharp.fixed}
431430
title="Make something with Ethereum"
432431
description="If you want to try building something, Ethereum studio will introduce you to the code. You'll also find more tutorials and resources that will help you get started."
433432
>
@@ -436,8 +435,7 @@ const WhatIsEthereumPage = ({ data }) => {
436435
</div>
437436
</StyledCallout>
438437
<StyledCallout
439-
maxImageWidth={"218px"}
440-
image={data.community.childImageSharp.fluid}
438+
image={data.community.childImageSharp.fixed}
441439
title="The Ethereum community"
442440
description="Our community includes people from all backgrounds, including artists, crypto-anarchists, fortune 500 companies, and now you. Find out how you can get involved today."
443441
>
@@ -465,8 +463,8 @@ export const actionCardImage = graphql`
465463
export const calloutImage = graphql`
466464
fragment calloutImage on File {
467465
childImageSharp {
468-
fluid(maxHeight: 250) {
469-
...GatsbyImageSharpFluid
466+
fixed(height: 200) {
467+
...GatsbyImageSharpFixed
470468
}
471469
}
472470
}

0 commit comments

Comments
 (0)