mirror of
https://github.com/tiennm99/ghstats.git
synced 2026-08-31 10:34:02 +00:00
Align card set with github-profile-summary-cards' 5-card layout: 0-profile-details.svg (unchanged) 1-repos-per-language.svg (new) owned repos grouped by primary language 2-most-commit-language.svg (new) last-year commits attributed to each repo's primary language 3-stats.svg (renumbered) 4-productive-time.svg (renumbered) - FetchProductive now fills p.CommitsByLanguage from the same commit history it uses for the heatmap, so no extra API calls are introduced. - TopRepos carries primary language so productive-time can aggregate by lang. - LangStat.Bytes renamed to Value (repo count or commit count, context-dependent). - Shared bar+legend renderer extracted to language_bar.go. - Ignore generated output/ directory.
15 lines
426 B
Go
15 lines
426 B
Go
package card
|
|
|
|
import (
|
|
"github.com/tiennm99/ghstats/internal/github"
|
|
"github.com/tiennm99/ghstats/internal/theme"
|
|
)
|
|
|
|
type mostCommitLanguageCard struct{}
|
|
|
|
func (mostCommitLanguageCard) Filename() string { return "2-most-commit-language.svg" }
|
|
|
|
func (mostCommitLanguageCard) SVG(p *github.Profile, t theme.Theme) ([]byte, error) {
|
|
return renderLanguageCard("Most Commit Language (last year)", p.CommitsByLanguage, t), nil
|
|
}
|