Files
rohitg00__agentmemory/website/components/GitHubStarButton.module.css
Rohit Ghumare 3f661d2e42 feat(website): add Star on GitHub button to hero CTA row (#316)
Hero only had START IN 60 SECONDS + SEE IT MOVE. Missing the obvious
CTA for visitors who landed via X/Reddit and want to bookmark before
installing.

Adds GitHubStarButton component next to the existing ghost button:

- ghost-style button matching the existing visual register
  (no new design surface introduced)
- star icon (inline SVG, currentColor) + STAR label + live
  star count
- count fetches once on mount from api.github.com/repos/<repo>
  (unauthenticated, 60 req/h limit per IP — fine for a marketing page)
- 30-minute localStorage cache keyed by repo so repeat visits don't
  re-hit the API
- graceful degradation: if fetch fails (offline, rate-limited,
  blocked), button still renders without the count

Only client-side ("use client") because we want the live count.
No deps added. Build clean (Next 16 static export).
2026-05-13 00:13:39 +01:00

31 lines
507 B
CSS

.starBtn {
display: inline-flex;
align-items: center;
gap: 8px;
}
.icon {
display: inline-block;
flex: 0 0 auto;
margin-top: -2px;
}
.label {
letter-spacing: 0.08em;
}
.count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2.5ch;
padding: 0 6px;
margin-left: 4px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.08);
color: var(--mist, #cfd2d1);
font-variant-numeric: tabular-nums;
font-size: 0.85em;
letter-spacing: 0.04em;
}