diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts index dda1210..f1d789a 100644 --- a/src/i18n/translations.ts +++ b/src/i18n/translations.ts @@ -37,6 +37,10 @@ export const translations = { rights: 'All rights reserved', }, project: { + featured: "Featured", + filter: { + all: "All", + }, tag: { business: 'Business Project', opensource: 'Open Source', @@ -111,6 +115,10 @@ export const translations = { rights: '版权所有', }, project: { + featured: "精选", + filter: { + all: "全部", + }, tag: { business: '商业项目', opensource: '开源项目', @@ -192,4 +200,4 @@ export function generateFlatTranslations() { /** * Flattened translations for faster lookups */ -export const flatTranslations = generateFlatTranslations(); \ No newline at end of file +export const flatTranslations = generateFlatTranslations(); diff --git a/src/pages/hire.astro b/src/pages/hire.astro index e3d1761..4b3cd0f 100644 --- a/src/pages/hire.astro +++ b/src/pages/hire.astro @@ -17,14 +17,14 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
{lang === 'zh' ? '专业合作' : 'Professional Collaboration'} -

+

{lang === 'zh' ? '合作' : 'Hire Me'}

@@ -50,7 +50,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';

-
+

{lang === 'zh' ? '初创公司' : 'Startups'}

@@ -61,7 +61,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';

-
+

{lang === 'zh' ? '独立创始人' : 'Indie Hackers'}

@@ -72,7 +72,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';

-
+

{lang === 'zh' ? '传统企业' : 'Traditional Businesses'}

@@ -83,7 +83,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';

-
+

{lang === 'zh' ? '技术团队' : 'Technical Teams'}

@@ -99,7 +99,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
@@ -112,7 +112,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
@@ -128,7 +128,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
🌐 @@ -144,7 +144,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
📱 @@ -178,7 +178,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
🤝
@@ -192,7 +192,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';

-
+
💰
@@ -206,7 +206,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';

-
+
@@ -225,7 +225,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
@@ -237,7 +237,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
  • @@ -310,7 +310,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+
@@ -339,7 +339,7 @@ const pageTitle = lang === 'zh' ? '合作' : 'Hire Me';
-
+

diff --git a/src/pages/index.astro b/src/pages/index.astro index 3e8ba94..576ffe3 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -23,7 +23,7 @@ const pageTitle = t('site.title');
-
+
@@ -202,7 +202,7 @@ const pageTitle = t('site.title'); -
+
@@ -219,7 +219,7 @@ const pageTitle = t('site.title');
-
+
@@ -471,7 +471,7 @@ const pageTitle = t('site.title');
-
+
{t('project.tag.business')}
@@ -534,7 +534,7 @@ const pageTitle = t('site.title');
-
+
{t('project.tag.opensource')}
@@ -597,7 +597,7 @@ const pageTitle = t('site.title');
-
+
{t('project.tag.personal')}
diff --git a/src/pages/now.astro b/src/pages/now.astro index 94c5949..eb3e352 100644 --- a/src/pages/now.astro +++ b/src/pages/now.astro @@ -17,14 +17,14 @@ const pageTitle = lang === 'zh' ? '现在' : 'Now';
-
+
{lang === 'zh' ? '关于我现在正在做什么' : "What's happening now"} -

+

{lang === 'zh' ? '现在' : 'Now'}

@@ -49,7 +49,7 @@ const pageTitle = lang === 'zh' ? '现在' : 'Now';

-
+
@@ -74,7 +74,7 @@ const pageTitle = lang === 'zh' ? '现在' : 'Now';
-
+
@@ -87,7 +87,7 @@ const pageTitle = lang === 'zh' ? '现在' : 'Now';
-
+

{lang === 'zh' ? 'AI Agents 与工作流自动化' : 'AI Agents & Workflow Automation'}

@@ -98,7 +98,7 @@ const pageTitle = lang === 'zh' ? '现在' : 'Now';

-
+

{lang === 'zh' ? '产品导向的开发实践' : 'Product-Led Development Practices'}

@@ -127,7 +127,7 @@ const pageTitle = lang === 'zh' ? '现在' : 'Now';
-
+
@@ -160,7 +160,7 @@ const pageTitle = lang === 'zh' ? '现在' : 'Now';
-
+

{lang === 'zh' ? '我始终对新的合作机会持开放态度。无论你是想要构建产品、寻找技术合伙人,还是需要技术咨询,都可以联系我。' diff --git a/src/pages/projects.astro b/src/pages/projects.astro index 747b6d8..43663b1 100644 --- a/src/pages/projects.astro +++ b/src/pages/projects.astro @@ -16,32 +16,34 @@ const pageTitle = t('projects.title'); // 根据当前语言获取项目数据 const currentProjects = projects[lang as keyof typeof projects] || projects.en; -// Separate featured and grouped projects -const featuredProject = currentProjects.find(p => p.featured); -const otherProjects = currentProjects.filter(p => !p.featured); +const filterOptions = [ + { key: "all", label: t("project.filter.all") }, + { key: "product", label: t("project.type.product") }, + { key: "client", label: t("project.type.client") }, + { key: "experiment", label: t("project.type.experiment") }, +]; -// Group by type -const productProjects = otherProjects.filter(p => p.type === 'product'); -const clientProjects = otherProjects.filter(p => p.type === 'client'); -const experimentProjects = otherProjects.filter(p => p.type === 'experiment'); +const statusClassMap = { + building: "bg-amber-500/15 text-amber-700 dark:text-amber-300 border-amber-500/30", + completed: "bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 border-emerald-500/30", + archived: "bg-slate-500/15 text-slate-700 dark:text-slate-300 border-slate-500/30", +} as const; --- -

- -
- -
+
+ - -
- -

+
+ +
+

{t('projects.title')}

- -

{t('projects.slogan')} {t('projects.description')}

@@ -49,274 +51,119 @@ const experimentProjects = otherProjects.filter(p => p.type === 'experiment');
- - {featuredProject && ( -
- -
-
- - Featured - -
- -
-
-
-
{featuredProject.icon}
-
-
-
- - {t(`project.status.${featuredProject.status}`)} - - - {t(`project.type.${featuredProject.type}`)} - -
- -

{featuredProject.title}

- -
-
- {t('project.role')}: -

{featuredProject.role}

-
-
- {t('project.impact')}: -

{featuredProject.impact}

-
-
- -
- {featuredProject.description.map((desc) => ( -

{desc}

- ))} -
- -
- {featuredProject.tech.map((tech) => ( - {tech} - ))} -
- -
- - {t('project.visit')} - - - - - {featuredProject.links?.github && ( - - - - - GitHub - - )} -
-
-
-
-
-
-
- )} - - -
+
- - {productProjects.length > 0 && ( - <> -
-
- 🛍️ -
-

{t('project.type.product')}

-
-
- {productProjects.map((project) => ( -
-
- {t(`project.status.${project.status}`)} +
+
+ {filterOptions.map((option, index) => ( + + ))} +
+ +
+ {currentProjects.map((project) => ( +
+
+
+

+ {project.icon} + {project.title} +

+

{t(`project.type.${project.type}`)}

- -
-
-
-
- {project.title} -
-
-
- -
-

- {project.icon} - {project.title} -

-
- -
-
- {project.description.slice(0, 2).map((desc) => ( -
- - {desc} -
- ))} -
- -
- {project.tech.slice(0, 4).map((tech) => ( - {tech} - ))} -
-
- -
- - {t('project.visit')} - - - - +
+ {project.featured && ( + + {t("project.featured")} + + )} + + {t(`project.status.${project.status}`)} +
- ))} -
- - )} - - {clientProjects.length > 0 && ( - <> -
-
- 💼 -
-

{t('project.type.client')}

-
-
- {clientProjects.map((project) => ( -
-
- {t(`project.status.${project.status}`)} -
- -
-
-
-
- {project.title} -
-
-
- -
-

- {project.icon} - {project.title} -

-
- -
-
- {project.description.slice(0, 2).map((desc) => ( -
- - {desc} -
- ))} -
- -
- {project.tech.slice(0, 4).map((tech) => ( - {tech} - ))} -
-
- - +
+ {project.description.slice(0, 2).map((desc) => ( +

{desc}

+ ))}
- ))} -
- - )} - - {experimentProjects.length > 0 && ( - <> -
-
- 🧪 -
-

{t('project.type.experiment')}

-
-
- {experimentProjects.map((project) => ( -
-
- {t(`project.status.${project.status}`)} -
- -
-
-
-
- {project.title} -
-
-
- -
-

- {project.icon} - {project.title} -

-
- -
-
- {project.description.slice(0, 2).map((desc) => ( -
- - {desc} -
- ))} -
- -
- {project.tech.slice(0, 4).map((tech) => ( - {tech} - ))} -
-
- - +
+ {project.tech.slice(0, 4).map((tech) => ( + {tech} + ))}
- ))} -
- - )} + +
+ + {t('project.visit')} + + + + + {project.links?.github && ( + + GitHub + + )} +
+
+ ))} +
+