diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index d2b6740..eb07678 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -29,12 +29,20 @@ export default function Footer({ lang: propLang }: FooterProps) { transition={{ duration: 0.5 }} viewport={{ once: true }} > - - © {new Date().getFullYear()} { personalInfo.name }. {t('footer.rights')} ✨ - + + + © {new Date().getFullYear()} { personalInfo.name }. {t('footer.rights')} ✨ + + + {lang === 'zh' ? '如果你正在寻找一名前端/Ts全栈工程师(远程工作),请联系我!' : 'Looking for a Frontend/TS Full-stack Engineer (Remote)? Contact me!'} + + Latest Blog

- Dive into my thoughts on coding, tech trends, and developer life. Explore my latest posts below. + {t('blog.slogan')} Dive into my thoughts on coding, tech trends, and developer life. Explore my latest posts below.

diff --git a/src/pages/projects.astro b/src/pages/projects.astro index 0a16280..aab4d77 100644 --- a/src/pages/projects.astro +++ b/src/pages/projects.astro @@ -33,7 +33,7 @@ const currentProjects = projects[lang as keyof typeof projects] || projects.en;

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

diff --git a/src/pages/services.md b/src/pages/services.md index 750241c..ac97d03 100644 --- a/src/pages/services.md +++ b/src/pages/services.md @@ -6,6 +6,8 @@ layout: "../layouts/AboutLayout.astro" # Services I Provide 🛠️ +用优雅的代码和创新的思维,为复杂问题打造精致的解决方案。 + ## Web Development 🌐 - Building responsive and modern websites using the latest technologies diff --git a/src/pages/zh/blog/index.astro b/src/pages/zh/blog/index.astro index c261211..ae06efb 100644 --- a/src/pages/zh/blog/index.astro +++ b/src/pages/zh/blog/index.astro @@ -5,12 +5,13 @@ import CategoryCard from '../../../components/blog/CategoryCard.astro'; import TagCard from '../../../components/blog/TagCard.astro'; import Container from '../../../components/ui/Container'; import { type BlogPost } from '@/types'; -import { type Lang } from '@/i18n/utils'; +import { type Lang, useTranslations } from '@/i18n/utils'; import { defaultLang } from '@/i18n/ui'; import { sortPostsByDate, extractCategories, extractTags } from '@/utils/blog-utils'; // 使用Astro.currentLocale获取当前语言环境 const lang = Astro.currentLocale as Lang || defaultLang; +const t = useTranslations(lang); // 使用import.meta.glob读取所有中文博客文章 const allPosts = await import.meta.glob('./posts/*.md', { eager: true }); @@ -62,7 +63,7 @@ const tags = extractTags(allPostsArray); 我的博客

- 深入我对编程、技术趋势和开发者生活的思考。探索我的最新文章。 + {t('blog.slogan')} 探索我对网络开发、设计和技术的想法、教程和见解。