feat(game-card): Satori route handler returning 1080×1080 PNG - #92
Draft
brianespinosa wants to merge 1 commit into
Draft
feat(game-card): Satori route handler returning 1080×1080 PNG#92brianespinosa wants to merge 1 commit into
brianespinosa wants to merge 1 commit into
Conversation
…0×1080 PNG - Add route.tsx with ImageResponse: branch logo, team badges, team names, kickoff time - Add _backgrounds.tsx with HomeBg/AwayBg SVG components - Add src/lib/og/fonts.ts for woff font loading and src/lib/og/fitText.ts for opentype.js glyph-width sizing - Match Arsenal row width to opponent row width using getAdvanceWidth closed-form calc - Add ?simulate=away query param for testing away fixture layout - Remove GameCard components, page.tsx, loading.tsx, and orphaned bg SVGs - Remove react-textfit; add opentype.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
page.tsx+ client-sideGameCardcomponents with aroute.tsxroute handler at the same URL returningimage/pngvianext/ogImageResponsesrc/lib/og/fonts.tsfor WOFF font loading andsrc/lib/og/fitText.tsforopentype.jsglyph-width-based font sizinggetAdvanceWidthclosed-form calculation?simulate=awayquery param for testing the away fixture layout (AwayBg) without needing a real away fixtureGameCardcomponent directory,page.tsx,loading.tsx, and orphaned bg SVGsreact-textfit/@types/react-textfit; addsopentype.jsStill pending
filter: drop-shadow()clips to element paint area; SVG-nativefeDropShadowis not rendering. Current state usesbox-shadowwithborderRadius: 50%as an approximation. Needs more investigation tomorrow.Test plan
curl -I http://localhost:3000/tacomagooners.com/game-card—Content-Type: image/pngcurl -o /tmp/card.png http://localhost:3000/tacomagooners.com/game-card && open /tmp/card.png— inspect 1080×1080?simulate=awayvariant for away layoutyarn build && yarn start— no build errors