feat(website): add source type badges for non-GitHub entries

Detect the hosting source (stdlib, GitLab, Bitbucket, External) from
the entry URL and surface it as a small badge in the stars column where
a star count would otherwise show an em dash.

Stdlib entries also get their own sort tier — between starred entries
and other no-star entries — so the standard library is not buried at
the bottom of each category.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-03-22 02:03:00 +08:00
parent f7b51a6207
commit 666f6e52d0
3 changed files with 41 additions and 3 deletions

View File

@@ -334,6 +334,19 @@ th[data-sort].sort-asc::after {
text-align: right;
}
/* === Source Badges === */
.source-badge {
display: inline-block;
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.03em;
color: var(--text-muted);
background: var(--bg-input);
padding: 0.15rem 0.45rem;
border-radius: 3px;
white-space: nowrap;
}
/* === Arrow Column === */
.col-arrow {
width: 2.5rem;