Rebuild the landing page SDK card in HTML/CSS, with Swift and Rust as real tabs - #6555
Rebuild the landing page SDK card in HTML/CSS, with Swift and Rust as real tabs#6555devin-ai-integration[bot] wants to merge 5 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
🌿 Preview your docs: https://fern-preview-devin-1785978439-sdk-swift-rust-tabs.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
…real tabs Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Runtime test results — rebuilt SDK cardTested on a local ✅ All nine tabs work — Swift and Rust are liveEvery tab moves the green underline and swaps the install command; only one command is visible at a time. Swift and Rust, previously dead grey artwork, are now fully selectable.
Hover (scale + pointer cursor, no layout shift), arrow-key navigation with a visible focus ring, dark mode (card background, underline and Rust logo variant all switch), and ~520px / ~286px widths (all nine tabs stay on one row, no wrapping or overlap) all pass. 🔧 Fixed during testing: .NET command rendered an em dashThe run caught MDX smart punctuation converting
|
| Pre-PR baseline (blank) | This PR (SDK card now real markup) |
|---|---|
…ttom Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Summary
The SDK mockup on
/learn/homewas a Rive canvas (sdk-rive.riv, hosted on the Webflow CDN). Its state machine only defines TypeScript, Python, GO, Java, NET, PHP and Ruby; Swift and Rust are inert grey artwork with no hover, no active state and no install string, and nothing in this repo can change that. This replaces the canvas with plain markup + CSS, so all nine languages are real tabs.How it works:
<input type="radio">at the top of.sdk-card, one<label>per language. Selection is CSS-only —#sdk-card-<lang>:checked ~ .sdk-card-tabssets--tab-index/--underline-width(the sliding green underline) and~ .sdk-card-command .sdk-card-command-<lang>reveals that language's install string. No JS, no hydration, works on preview deployments, and the radios give arrow-key navigation for free.calc(N * var(--u))where--u: 0.271003cqw— one unit of the Rive artboard's 369×93 grid, with the card as a container query container.Nis the measurement taken off the rendered.riv, so the layout is the artboard's geometry rather than an approximation, and it scales with the card like the canvas did.box-shadowrather than a real border: withaspect-ratio: 369/93a 1px border would shrink the content box below 93u and drag every row off the grid..package(url: "https://github.com/your-company/swift-sdk")(SwiftPM has no registry) andcargo add your-company.rive-animation.js; the Docs and Ask Fern canvases are untouched.Two known deltas from the artboard: the labels/commands render in the site's
var(--font-code)stack instead of the artboard's JetBrains Mono (advance widths match, so the layout is identical; glyph shapes differ), and the intro wipe/typing animation is gone.Reference (Rive) on top, this PR below — light TypeScript and dark Ruby:
Link to Devin session: https://app.devin.ai/sessions/3f1fa02d46d94431b1331d3d9ae97933