diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 19c5677e1..cde1a5f07 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -27,8 +27,12 @@ export default { if (!githubLink.querySelector('.star-count')) { const starBadge = document.createElement('span') starBadge.className = 'star-count' - starBadge.textContent = starsData.stars starBadge.title = 'GitHub Stars' + const glyph = document.createElement('span') + glyph.className = 'star-glyph' + glyph.textContent = '★' + glyph.setAttribute('aria-hidden', 'true') + starBadge.append(glyph, starsData.stars) githubLink.appendChild(starBadge) } }) diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index 14e44f1bf..1b67a56ae 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -399,6 +399,12 @@ h1, .vp-doc h1 { line-height: 1; } +.VPSocialLinks .star-count .star-glyph { + font-family: -apple-system, "Segoe UI Symbol", sans-serif; + line-height: 1; + margin-right: 0.2em; +} + .VPSocialLinks a[href*="github.com/jdx/hk"]:hover .star-count { color: var(--vp-c-brand-1); }