From 333f1aa12a3155dc0ec6ae0e3fdafc7d81fb444b Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Thu, 27 Aug 2026 14:39:53 +0700 Subject: [PATCH] feat(card): show seven repos on the top-starred card Retune row spacing to the stats/records rhythm so seven rows fit the shared 340x200 frame. --- README.md | 2 +- internal/card/top_starred_repos.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f6ad6dca..157f6a57 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Cards rendered: | 5 | Productive weekday (last year) | 7-bar day-of-week chart, peak day highlighted | | 6 | Contributions (last year) | Smooth monthly area chart, Y-axis mirrored both sides, `mm/yy` labels | | 7 | Contributions heatmap | Classic 7×53 calendar grid with theme-derived intensity ramp and legend | -| 8 | Top starred repos | Top 5 owned non-fork repos by ⭐, language dot + proportional bar | +| 8 | Top starred repos | Top 7 owned non-fork repos by ⭐, language dot + proportional bar | | 9 | Streak | Current streak, longest streak, active days / total days with date ranges | | 10 | **Most commit language (all time)** | Same as #2 but over lifetime commits | | 11 | **Productive time (all time)** | Same as #4 but over lifetime commits | diff --git a/internal/card/top_starred_repos.go b/internal/card/top_starred_repos.go index 88fc4de7..cfee9626 100644 --- a/internal/card/top_starred_repos.go +++ b/internal/card/top_starred_repos.go @@ -12,17 +12,17 @@ type topStarredReposCard struct{} func (topStarredReposCard) Filename() string { return "top-starred-repos.svg" } -// maxTopRepoRows is how many repos we show. Matches the legend density of the -// other list-style cards (donut top-5). -const maxTopRepoRows = 5 +// maxTopRepoRows is how many repos we show. Matches the row count the stats +// and records cards fit in the shared 340x200 frame. +const maxTopRepoRows = 7 func (topStarredReposCard) SVG(p *github.Profile, t theme.Theme) ([]byte, error) { const ( width = 340 height = 200 rowX = 20 - rowY0 = 60 - rowDY = 22 + rowY0 = 55 + rowDY = 20 barX = 150 barW = 120 // max bar width; the top repo fills this barH = 10