feat(contact): add multilingual contact pages and dynamic configurations

- Created `src/pages/contact.astro` and `src/pages/zh/contact.astro` to support multilingual contact functionality.
- Introduced `contactIntents` and `contactMethods` dynamic configurations in `src/lib/data/contact.ts` for streamlined content management.
- Designed responsive and localized layouts with enhanced UX for both languages.
This commit is contained in:
zguiyang
2026-03-16 15:32:40 +08:00
parent 965ae613f8
commit ce6110588f
40 changed files with 3474 additions and 2547 deletions

40
src/pages/uses.astro Normal file
View File

@@ -0,0 +1,40 @@
---
import Layout from '@/layouts/Layout.astro';
import GlassHeader from '@/components/GlassHeader';
import Footer from '@/components/Footer';
import Container from '@/components/ui/Container.astro';
import { uses } from '@/lib/data';
import type { Lang } from '@/types/i18n';
import { defaultLang } from '@/i18n/ui';
const lang = (Astro.currentLocale as Lang) || defaultLang;
const isZh = lang === 'zh';
---
<Layout title={isZh ? '工具' : 'Uses'}>
<GlassHeader lang={lang} client:load transition:persist="header" />
<main class="min-h-screen pt-24 pb-20">
<Container>
<section class="page-content-main">
<h1 class="text-4xl font-bold tracking-tight sm:text-5xl">{isZh ? '工具与工作流' : 'Uses'}</h1>
<p class="mt-4 text-lg text-muted-foreground">
{isZh ? '我在日常研发中稳定使用的工具与协作方式。' : 'Tools and workflows I use for daily engineering work.'}
</p>
</section>
<section class="page-content-main mt-10 grid gap-6 md:grid-cols-2">
{uses.map((group) => (
<article class="page-surface p-6">
<h2 class="text-lg font-bold">{group.title[lang]}</h2>
<ul class="mt-4 space-y-2 text-sm text-muted-foreground">
{group.items.map((item) => <li>• {item}</li>)}
</ul>
</article>
))}
</section>
</Container>
</main>
<Footer lang={lang} client:load />
</Layout>