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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user