Repository navigation
Show Featured on badges under the landing hero CTA - #183
Programcode wants to merge 1 commit into
Conversation
LaunchIgniter only counts a badge on the homepage above the fold, so the LaunchIgniter and StartupBase badges sit in a small row under the hero buttons. Both theme variants are in the prerendered HTML and Tailwind's dark: class shows one. The CSP img-src now allows both badge hosts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Deployment failed for project debate-navigator with the following error: Learn More: https://vercel.com/adam-gaborjanis-projects?upgradeToPro=build-rate-limit |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 30 minutes. View limit details
Note 🎁 Summarized by CodeRabbit Free
Comment |
|
Closed at Adam's request; not shipping the Featured-on badges. |
Adds a LaunchIgniter "Featured on" badge and a StartupBase "Launched on" badge in one row under the hero's Start Trial and View Pricing buttons. LaunchIgniter only counts a badge that is on the homepage and visible without scrolling, so it can't go in the footer.
What changed
src/components/landing/Hero.tsx: aFeaturedOnrow after the CTA row. Each badge renders a light and a dark link, and Tailwind'sdark:class shows one of them. The prerender can't know the visitor's theme, so both go into the HTML.theme-init.jssets thedarkclass before paint, and that class picks the variant. Every link hastarget="_blank" rel="noopener noreferrer"; the LaunchIgniter snippet left outrel, so I added it. Each image is a plain<img>withwidthandheightattributes,loading="eager"andh-10 w-auto. The sizes are 154x40 for LaunchIgniter (its SVG is 212x55) and 150x40 for StartupBase (300x80). The 40px CSS height keeps the box the same size whether or not the image loads.vercel.json:img-srcnow allowshttps://launchigniter.comandhttps://statics.startupbase.io. It still has no barehttps:, which the existing CSP test forbids.The prerendered
dist/index.htmlcontains all four links and images (two badges, two themes), so a verifier that fetches the raw HTML finds them without running JS.Above the fold
I measured the built
dist/with Playwright in light and dark. A local server sent the production CSP header fromvercel.json. Positions are CSS pixels from the top of the viewport. I ran the measurement twice at046b504c, first on the VPS and then on a separate VM, and got the same numbers both times.On short laptop screens the hero's CTA itself is near or past the fold, so no spot under the CTA can be above it. Fixing that means tightening the hero's top spacing, which this PR leaves alone.
Layout shift is 0 on mobile. On desktop the page shifts by about 0.0095 at load, when the announcement and headline move up 20px. I served the same build with the strip removed from the HTML and got the same 0.0095, so the badges add none.
Screenshots
GitHub's CLI can't attach images, so the screenshots are on the
pr-assets/featured-on-badgesbranch, which is not for merging. All of them come from046b504cwith the production CSP applied.VM run
LaunchIgniter's Cloudflare challenges this VM's IP (see below), so its badge shows alt text in its reserved 154x40 box. The StartupBase badge loads in both themes.
Desktop 1440x900, light and dark:
Mobile 390x844, light and dark:
Small phone 375x667, light and dark:
The 1280x720 laptop, where the strip is cut at the fold:
With the real LaunchIgniter badge
These come from the earlier VPS run, which sent traffic through a residential proxy so LaunchIgniter served the image. They are the same commit at the same sizes.
LaunchIgniter blocks datacenter IPs
From both the VPS and the VM,
launchigniter.com/api/badge/debatelabreturns Cloudflare's bot challenge (403,cf-mitigated: challenge,cross-origin-resource-policy: same-origin). Chromium refuses that response withERR_BLOCKED_BY_RESPONSE.NotSameOrigin. The error comes from LaunchIgniter's response headers, not from our CSP. Visiting launchigniter.com first in the same browser did not clear the challenge. Through a residential proxy the same URL returns200 image/svg+xml(212x55, no CORP header), and the light and dark files differ. A visitor whose IP Cloudflare challenges sees the alt text in the same 154x40 box, with no layout shift.Checks
GitHub Actions is out of minutes, so these are local runs at
046b504c, not CI. On the VM, one fullnpm run verifyrun passed with exit code 0.npm run docs:checkpassed.npm run lint(eslint, knip and the repo rules) passed.npm run typecheck(app, agentic and core) passed.npm testpassed 315 tests in 40 files.npm run test:collaborationpassed 30 tests.npm run test:edgepassed 361 tests with 0 failures.npm run buildpassed, including the prerender and sitemap. The builtdist/index.htmlcontains both badge links in both themes.npm run test:swpassed the offline service worker checks.npm run test:e2e:smokepassed 30 tests on desktop Chromium.The earlier VPS run of the same steps, done one at a time because of its memory guard, gave the same results.
mainhas moved since this branch was cut. The new commits touch none of these files, and the branch merges cleanly.Not run: staging, production, WebKit, and the
verify-debatelabrecipes and agentic suite. The recipes don't cover the public landing page, and this change has no backend part. Nothing is deployed.🤖 Generated with Claude Code