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

@@ -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>