diff --git a/.cache/project-stats.json b/.cache/project-stats.json index c6e5611..6f06afa 100644 --- a/.cache/project-stats.json +++ b/.cache/project-stats.json @@ -1,30 +1,40 @@ { - "updated_at": "2026-06-15T20:52:05.688Z", + "updated_at": "2026-06-15T14:44:37.328Z", "repos": { "iflytek/astron-agent": { - "stars": 8560, + "stars": 8561, "forks": 853, - "updated_at": "2026-06-15T20:52:04.897Z" + "updated_at": "2026-06-15T14:44:36.620Z" }, "iflytek/astron-rpa": { "stars": 5177, "forks": 576, - "updated_at": "2026-06-15T20:52:05.088Z" + "updated_at": "2026-06-15T14:44:36.738Z" }, "iflytek/astronclaw-tutorial": { "stars": 410, - "forks": 43, - "updated_at": "2026-06-15T20:52:05.291Z" + "forks": 41, + "updated_at": "2026-06-15T14:44:36.857Z" + }, + "harnessclaw/harnessclaw-engine": { + "stars": 266, + "forks": 91, + "updated_at": "2026-06-15T14:44:36.976Z" + }, + "harnessclaw/harnessclaw": { + "stars": 316, + "forks": 82, + "updated_at": "2026-06-15T14:44:37.092Z" }, "iflytek/iFly-Skills": { "stars": 184, "forks": 23, - "updated_at": "2026-06-15T20:52:05.482Z" + "updated_at": "2026-06-15T14:44:37.207Z" }, "iflytek/skillhub": { - "stars": 3472, + "stars": 3471, "forks": 502, - "updated_at": "2026-06-15T20:52:05.688Z" + "updated_at": "2026-06-15T14:44:37.328Z" } } } \ No newline at end of file diff --git a/.gitignore b/.gitignore index a9342f8..93da215 100644 --- a/.gitignore +++ b/.gitignore @@ -30,10 +30,9 @@ lerna-debug.log* # ============================================ # Cache directories # ============================================ -# Keep contributors.json and project-stats.json for site to work +# Keep contributors.json for site to work .cache/* !.cache/contributors.json -!.cache/project-stats.json .vercel/ # ============================================ diff --git a/CHANGELOG.md b/CHANGELOG.md index e238eb6..7aa00b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ All notable changes to this project will be documented in this file. ### Added +- **i18n Language Toggle**: Client-side 中文/EN toggle button in header (`ToggleLanguage.astro`), persisted via `localStorage.lang`, effective across all pages without reload +- **i18n Attribute System**: `data-i18n="key"` attribute-based translation with central dictionary (`translations.ts`); `data-lang-zh`/`data-lang-en` for inline bilingual text switching +- **CSS Content Visibility**: `.i18n-zh`/`.i18n-en` CSS class system with `html.lang-en` class toggle for full-page bilingual content on static pages +- **Bilingual Static Pages**: Full Chinese/English content for `/security` (安全策略), `/values` (社区价值观), `/cla` (贡献者许可协议) using dual-div layout +- **i18n Coverage**: `data-i18n` attributes added to all pages — home, projects, project detail, contribute, events, landscape, blog, blog categories, pagination, post navigation, related posts +- **New Projects**: Add HarnessClaw (Electron desktop app, agent-management) and HarnessClaw Engine (Go LLM engine, agent-engine) — total 7 projects +- **Landscape Rewrite**: Complete treemap rewrite matching awesome-astron-workflow.dev/landscape — 6 categories (agentic-workflow, agentic-automation, agent-skills, tutorial, agent-management, agent-engine), 3-column layout (42%/33%/25%), SVG ecosystem arrows, bilingual labels via `.i18n-zh`/`.i18n-en` +- **Landscape Download Fix**: "Save HD Image" button uses CDN-based `html-to-image` (`is:inline` script) — fixes bundling issue where page-level ` + + diff --git a/src/components/common/ToggleLanguage.astro b/src/components/common/ToggleLanguage.astro new file mode 100644 index 0000000..27dc1b8 --- /dev/null +++ b/src/components/common/ToggleLanguage.astro @@ -0,0 +1,31 @@ +--- +export interface Props { + label?: string; + class?: string; +} + +const { label = 'Language', class: className = '' } = Astro.props; +--- + +
+ + +
diff --git a/src/components/projects/ProjectCard.astro b/src/components/projects/ProjectCard.astro index d178fd1..f5fff9f 100644 --- a/src/components/projects/ProjectCard.astro +++ b/src/components/projects/ProjectCard.astro @@ -2,6 +2,7 @@ interface Props { name: string; description: string; + descriptionEn?: string; repo: string; homepage?: string; category: string; @@ -15,6 +16,7 @@ interface Props { const { name, description, + descriptionEn, repo, homepage, category, @@ -26,23 +28,21 @@ const { } = Astro.props; const categoryColors: Record = { - 'ai-platform': 'bg-blue-100 text-blue-800 dark:bg-blue-900/50 dark:text-blue-300', - 'developer-tools': 'bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-300', - 'rpa-automation': 'bg-rose-100 text-rose-800 dark:bg-rose-900/50 dark:text-rose-300', - 'ai-skills': 'bg-cyan-100 text-cyan-800 dark:bg-cyan-900/50 dark:text-cyan-300', - tutorials: 'bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-300', - 'nlp-speech': 'bg-purple-100 text-purple-800 dark:bg-purple-900/50 dark:text-purple-300', - infrastructure: 'bg-orange-100 text-orange-800 dark:bg-orange-900/50 dark:text-orange-300', + 'agentic-workflow': 'bg-sky-100 text-sky-800 dark:bg-sky-900/50 dark:text-sky-300', + 'agentic-automation': 'bg-teal-100 text-teal-800 dark:bg-teal-900/50 dark:text-teal-300', + 'agent-skills': 'bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-300', + tutorial: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-300', + 'agent-management': 'bg-purple-100 text-purple-800 dark:bg-purple-900/50 dark:text-purple-300', + 'agent-engine': 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900/50 dark:text-indigo-300', }; -const categoryLabels: Record = { - 'ai-platform': 'AI 平台', - 'developer-tools': '开发者工具', - 'rpa-automation': 'RPA & 自动化', - 'ai-skills': 'AI 技能', - tutorials: '教程', - 'nlp-speech': 'NLP & 语音', - infrastructure: '基础设施', +const categoryLabels: Record = { + 'agentic-workflow': { zh: '智能体工作流 (agentic-workflow)', en: 'agentic-workflow' }, + 'agentic-automation': { zh: '智能体自动化 (agentic-automation)', en: 'agentic-automation' }, + 'agent-skills': { zh: '智能体技能 (agent-skills)', en: 'agent-skills' }, + tutorial: { zh: '教程指南 (tutorial)', en: 'tutorial' }, + 'agent-management': { zh: '智能体管理 (agent-management)', en: 'agent-management' }, + 'agent-engine': { zh: '智能体引擎 (agent-engine)', en: 'agent-engine' }, }; const langColors: Record = { @@ -92,14 +92,30 @@ function formatNumber(n: number): string { categoryColors[category] || 'bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300', ]} > - {categoryLabels[category] || category} + { + categoryLabels[category] ? ( + + {categoryLabels[category].zh} + + ) : ( + category + ) + }

- {description} + { + descriptionEn ? ( + + {description} + + ) : ( + description + ) + }

diff --git a/src/components/widgets/Features.astro b/src/components/widgets/Features.astro index 0c7ce2e..8909f6e 100644 --- a/src/components/widgets/Features.astro +++ b/src/components/widgets/Features.astro @@ -49,9 +49,10 @@ const columnsClass = )}
{itemTitle && ( -

- {itemTitle} -

+

)} {description &&

} {callToAction && ( diff --git a/src/components/widgets/Footer.astro b/src/components/widgets/Footer.astro index 30a3394..8d8074b 100644 --- a/src/components/widgets/Footer.astro +++ b/src/components/widgets/Footer.astro @@ -5,6 +5,7 @@ import { getHomePermalink } from '~/utils/permalinks'; interface Link { text?: string; + textEn?: string; href?: string; ariaLabel?: string; icon?: string; @@ -12,6 +13,7 @@ interface Link { interface Links { title?: string; + titleEn?: string; links: Array; } @@ -34,35 +36,44 @@ const { socialLinks = [], secondaryLinks = [], links = [], footNote = '', theme

{ - secondaryLinks.map(({ text, href }, index) => ( + secondaryLinks.map(({ text, textEn, href }, index) => ( <> {index !== 0 ? ' · ' : ''} + data-lang-zh={text} + data-lang-en={textEn || text} + > + + )) }
{ - links.map(({ title, links }) => ( + links.map(({ title, titleEn, links }) => (
-
{title}
+
+ {title} +
{links && Array.isArray(links) && links.length > 0 && (
{ actions?.length ? ( diff --git a/src/components/widgets/Hero.astro b/src/components/widgets/Hero.astro index 567c680..076277b 100644 --- a/src/components/widgets/Hero.astro +++ b/src/components/widgets/Hero.astro @@ -21,7 +21,19 @@ const {