feat(i18n): add slogans and update translations for multiple pages

Add new slogan translations for projects and blog pages in both English and Chinese
Update about and services pages with additional content
Modify footer to include remote work availability notice
This commit is contained in:
joyzhao
2025-06-20 10:49:53 +08:00
parent 3909db0ceb
commit a446ce68bd
7 changed files with 33 additions and 11 deletions

View File

@@ -12,6 +12,8 @@ I'm a TypeScript Full Stack Engineer who loves development, technology, and expl
I started my programming journey in 2016 when I accidentally encountered programming. This opportunity became the catalyst for my coding adventure, and I fell in love with programming during my subsequent self-learning journey. I enjoy creating websites and applications with code and sharing them with users. The sense of achievement I get from this process makes me increasingly fascinated. My dream is to become a lifelong coder.
我相信这里是想法变为现实的地方。我正在探索自由职业者之路,努力成为数字游民中的一员。
## My Skills 💪
Below are the technology stacks I'm currently familiar with or proficient in, as well as those I'm learning or planning to learn. If your project requires technologies I'm not familiar with, don't worry - I have excellent collaborative relationships with various tech experts, including but not limited to backend developers, app developers, UI designers, product managers, etc., and can provide any services you need.

View File

@@ -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 } from '@/utils/blog-utils';
// Get current language environment using Astro.currentLocale
const lang = Astro.currentLocale as Lang || defaultLang;
const t = useTranslations(lang);
// Read all blog posts using import.meta.glob
const allPosts = await import.meta.glob('./posts/*.md', { eager: true });
@@ -50,7 +51,7 @@ const sortedBlogPosts = sortPostsByDate(blogPosts);
Our <span class="text-purple-500">Latest</span> Blog
</h1>
<p class="text-xl text-muted-foreground max-w-3xl mx-auto">
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.
</p>
</div>
</Container>

View File

@@ -33,7 +33,7 @@ const currentProjects = projects[lang as keyof typeof projects] || projects.en;
<!-- Description -->
<p class="text-lg text-muted-foreground max-w-3xl mx-auto mb-12 leading-relaxed">
{t('projects.description')}
{t('projects.slogan')} {t('projects.description')}
</p>
</div>
</Container>

View File

@@ -6,6 +6,8 @@ layout: "../layouts/AboutLayout.astro"
# Services I Provide 🛠️
用优雅的代码和创新的思维,为复杂问题打造精致的解决方案。
## Web Development 🌐
- Building responsive and modern websites using the latest technologies

View File

@@ -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);
我的<span class="text-purple-500">博客</span>
</h1>
<p class="text-xl text-muted-foreground max-w-3xl mx-auto">
深入我对编程、技术趋势和开发者生活的思考。探索我的最新文章
{t('blog.slogan')} 探索我对网络开发、设计和技术的想法、教程和见解
</p>
</div>
</Container>