feat: ContentHero design update#16032
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
pettinarip
left a comment
There was a problem hiding this comment.
@wackerow looks good, left a question about the hero image dimensions
| ...frontmatter, | ||
| breadcrumbs: { slug, startDepth: 1 }, | ||
| heroImg: frontmatter.image, | ||
| heroImg: { src: frontmatter.image, width: 5750, height: 4332 }, |
There was a problem hiding this comment.
I'm a bit unsure about this pattern and whether it's truly needed.
For dynamic images, I assume we'll need to pass width and height for aspect ratio. If so, I'd define these in the ContentHero component, as all images there will likely require consistent dimensions.
There was a problem hiding this comment.
If the image is statically imported, Next.js will automatically determine the intrinsic width and height. These values are used to determine the image ratio and prevent Cumulative Layout Shift while your image is loading.
Not sure either I guess... it's not really meant to dictate the rendered size, more to tell the aspect ratio and prevent layout shift.. but if we're already confining the image to a fixed box size then likely doesn't matter?
| width={760} | ||
| height={451} |
There was a problem hiding this comment.
shouldn't we keep these dimensions to keep the same aspect ratio or a calculated width & height to avoid layout shifts?


Description
Updates ContentHero according to new /what-is-ethereum designs
Preview links
Layer 2 pages
Roadmap layout
Staking layout
Translatathon layout
Upgrade layout
Use cases layout