Skip to content

landing-page polish: fonts, motion, snippet, social proof#25

Merged
zhawtof merged 2 commits into
mainfrom
claude/dreamy-bhabha-ab5bdc
May 19, 2026
Merged

landing-page polish: fonts, motion, snippet, social proof#25
zhawtof merged 2 commits into
mainfrom
claude/dreamy-bhabha-ab5bdc

Conversation

@zhawtof
Copy link
Copy Markdown
Contributor

@zhawtof zhawtof commented May 18, 2026

Summary

Round of landing-page improvements following an audit. Nine changes, all independent and reviewable in isolation.

  • Fix the broken sitemap. @astrojs/sitemap was declared in package.json but missing from node_modules, so robots.txt's Sitemap: pointer 404'd. npm install + a green build confirm dist/sitemap-index.xml + dist/sitemap-0.xml now generate.
  • Event pill auto-hide. Hero.astro gates the Slack Dev Day pill on new Date() < SLACK_DEV_DAY_HIDE_AFTER (May 21). It vanishes on the next build after the date passes — pattern is reusable for future events.
  • Quick-start CTA. Brutalist $ npx degit tightknitai/slack-hono-template my-slack-app snippet under the hero buttons, with a copy button (yellow → cyan-on-success). Uses navigator.clipboard.writeText with a hidden-textarea fallback for insecure contexts.
  • Social proof, gated. New stat row on the repo section ({N} repos · ★ {N} stars · open source) renders only when total stars ≥ 100 (SOCIAL_PROOF_STAR_THRESHOLD in RepoGrid.astro). Hidden by default until traction is real.
  • Eyebrow/heading match. // featured// the stack to match the "The Stack." heading.
  • Self-hosted fonts. Replaced the Google Fonts <link>/preconnect/<noscript> block with @fontsource-variable/space-grotesk + @fontsource-variable/jetbrains-mono imports in global.css. One CDN hop removed, FOUC trick gone, English visitors pull ~64 KB of woff2 across two subsets.
  • prefers-reduced-motion. Global CSS rule flattens all animations + transitions when the OS preference is set. Covers the marquee, the floats, the pulse dot, and brutalist hover transforms.
  • Intl.RelativeTimeFormat. lib/github.ts formatRelativeTime now uses Intl.RelativeTimeFormat('en', { style: 'narrow', numeric: 'auto' }) with calendar-aware month math. Output stays compact ("5d ago", "5mo ago") and the floor-by-30 drift on month boundaries is gone.
  • Float blocks. Found a real bug while polishing: the inline animation-delay: -2s/-4s styles were on the parent wrappers, but the animations live on inner .float-block children — so the delays were no-ops and all three blocks were bobbing in lockstep. Replaced with .float-block-a/-b/-c, each with its own duration (6s / 6.8s / 7.4s), phase offset, and rotation range. Removed the inner Tailwind rotate-12 on the yellow block so its keyframe owns the full rotation.

Reviewer notes

  • Pick of the quick-start command. slack-hono is a library, not a CLI, so I went with npx degit tightknitai/slack-hono-template my-slack-app — the canonical idiom for scaffolding a non-create- template. If you have a preferred entry point (or want to rename my-slack-app), just edit QUICK_START_CMD in src/components/Hero.astro:7.
  • Social-proof threshold. 100 stars felt like the right "real traction" line, but it's a single const — change SOCIAL_PROOF_STAR_THRESHOLD in src/components/RepoGrid.astro if you want it lower.
  • Fontsource ships multiple subsets. Latin, latin-ext, vietnamese for Space Grotesk; latin, latin-ext, vietnamese, greek, cyrillic for JetBrains Mono. Browsers only fetch what they need via unicode-range, so the over-shipping is mostly a build-tree thing. If you want to trim, swap the @import '@fontsource-variable/...' to @import '@fontsource-variable/.../latin.css'.
  • document.execCommand('copy') deprecation. astro check flags it as a hint; it's the intentional fallback path for insecure contexts where navigator.clipboard isn't available.

Test plan

  • Hero renders the new quick-start snippet; copy button works (cyan "copied ✓" flashes for 1.5s) — try in both Chrome and Safari
  • Float blocks bob with visibly different phases / amplitudes / rotations
  • Slack Dev Day pill renders before May 21 and disappears after
  • Set OS "Reduce motion" → marquee, floats, pulse all stop; hover transitions feel instant
  • Repo grid eyebrow reads // the stack
  • Repo grid stat row is hidden when org stars total < 100 (current state with fallback data); flip the threshold locally to confirm rendering works
  • Network tab on a fresh load shows no fonts.googleapis.com / fonts.gstatic.com requests; instead fetches /_astro/space-grotesk-latin-wght-normal.*.woff2 + /_astro/jetbrains-mono-latin-wght-normal.*.woff2
  • dist/sitemap-index.xml + dist/sitemap-0.xml exist after npm run build
  • RepoCard relative-time labels read "Nd ago" / "Nmo ago" / "Ny ago" (Intl narrow style); spot-check a repo pushed yesterday and one pushed months ago
  • npm run build → 0 errors / 0 warnings (1 hint expected from the execCommand fallback)

🤖 Generated with Claude Code

- install missing @astrojs/sitemap; sitemap-index.xml now generates
- hero: auto-hide the Slack Dev Day pill once the event date passes
- hero: add brutalist quick-start snippet with copy button (npx degit)
- hero: vary float-block keyframes (a/b/c) + fix the inline animation-
  delays that were on the wrong element and never took effect
- repo grid: rename eyebrow "// featured" → "// the stack" to match heading
- repo grid: stats row ({N} repos · ★ {N} stars · open source), gated
  behind 100+ total stars so it stays hidden until traction is real
- styles: respect prefers-reduced-motion (animations + transitions)
- styles: self-host Space Grotesk + JetBrains Mono via @fontsource-variable,
  drop the Google Fonts <link>/preconnect block from Layout.astro
- lib/github: replace hand-rolled formatRelativeTime with
  Intl.RelativeTimeFormat (style: narrow) + calendar-correct month math

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 18, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tightknit-dev-website 3ce389b Commit Preview URL

Branch Preview URL
May 18 2026, 02:53 PM

The slack-hono-template was briefly private when this branch was first
opened, which made `npx degit tightknitai/slack-hono-template` 404 — degit
fetches anonymous tarballs. Leave a comment at both reference sites so we
don't surface a private repo there again.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zhawtof zhawtof merged commit 7f03bec into main May 19, 2026
2 checks passed
@zhawtof zhawtof deleted the claude/dreamy-bhabha-ab5bdc branch May 19, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant