Skip to content

Commit 3c211da

Browse files
committed
fix: avoid external stars badge in site hero
1 parent b322443 commit 3c211da

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

site/src/components/Hero.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,16 @@ export default function Hero({ t, lang, basePath }: Props) {
9494
</motion.div>
9595

9696
<motion.div variants={fadeUp}>
97-
<a href="https://github.com/ZengLiangYi/ChatCrystal" target="_blank" rel="noopener">
98-
<img
99-
src="https://img.shields.io/github/stars/ZengLiangYi/ChatCrystal?style=flat&logo=github&color=B8584B"
100-
alt="GitHub stars"
101-
loading="lazy"
102-
/>
97+
<a
98+
href="https://github.com/ZengLiangYi/ChatCrystal"
99+
target="_blank"
100+
rel="noopener"
101+
className="inline-flex min-h-9 items-center gap-2 rounded-md border border-[var(--color-border)] bg-[var(--color-paper)] px-3 py-2 text-sm font-semibold text-[var(--color-dim-white)] shadow-sm transition-colors hover:border-[var(--color-primary)] hover:text-[var(--color-primary)]"
102+
>
103+
<svg viewBox="0 0 16 16" fill="currentColor" className="h-4 w-4" aria-hidden="true">
104+
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.66 2.33.51.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82A7.67 7.67 0 0 1 8 3.73c.68 0 1.36.09 2 .27 1.53-1.03 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z" />
105+
</svg>
106+
<span>{t.hero.starOnGitHub}</span>
103107
</a>
104108
</motion.div>
105109
</motion.div>

site/src/i18n/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const en = {
1717
installCmd: 'npm i -g chatcrystal',
1818
copied: 'Copied!',
1919
downloadDesktop: 'Download Desktop App',
20+
starOnGitHub: 'Star on GitHub',
2021
highlights: [
2122
{ value: '5', label: 'AI coding sources' },
2223
{ value: 'Local', label: 'SQLite + vector index' },

site/src/i18n/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const zh: Translations = {
1919
installCmd: 'npm i -g chatcrystal',
2020
copied: '已复制!',
2121
downloadDesktop: '下载桌面应用',
22+
starOnGitHub: '在 GitHub 上 Star',
2223
highlights: [
2324
{ value: '5', label: 'AI 编程来源' },
2425
{ value: '本地', label: 'SQLite + 向量索引' },

0 commit comments

Comments
 (0)