From e8b9dfb3c310818e062ce31fc89b944c59a4b11d Mon Sep 17 00:00:00 2001 From: javayhu Date: Sun, 9 Mar 2025 15:09:55 +0800 Subject: [PATCH] feat: add contact page with internationalization support - Create contact page with responsive design and form layout - Add localized messages for English and Chinese contact pages - Implement form inputs with labels and validation - Use Shadcn/ui components for consistent styling - Add Card and Textarea components for enhanced UI --- messages/en.json | 11 +++- messages/zh.json | 9 +++ .../(marketing)/(pages)/contact/page.tsx | 65 +++++++++++++++++++ .../[locale]/(marketing)/(pages)/layout.tsx | 2 +- src/components/page/custom-page.tsx | 15 +++-- src/components/ui/textarea.tsx | 22 +++++++ src/config/marketing.tsx | 14 ++-- 7 files changed, 125 insertions(+), 13 deletions(-) create mode 100644 src/app/[locale]/(marketing)/(pages)/contact/page.tsx create mode 100644 src/components/ui/textarea.tsx diff --git a/messages/en.json b/messages/en.json index 8d8324d..355bd23 100644 --- a/messages/en.json +++ b/messages/en.json @@ -22,7 +22,16 @@ }, "ChangelogPage": { "title": "Changelog", - "subtitle": "Stay up to date with the latest changes in our product." + "subtitle": "Stay up to date with the latest changes in our product" + }, + "ContactPage": { + "title": "Contact", + "subtitle": "We'll help you find the right plan for your business", + "formDescription": "If you have any questions or feedback, please reach out to our team", + "name": "Name", + "email": "Email", + "message": "Message", + "submit": "Submit" }, "AuthPage": { "login": { diff --git a/messages/zh.json b/messages/zh.json index 26f2389..b3ea0b2 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -21,6 +21,15 @@ "title": "更新日志", "subtitle": "查看我们产品的最新动态" }, + "ContactPage": { + "title": "联系我们", + "subtitle": "我们帮助您找到合适的计划", + "formDescription": "如果您有任何问题或反馈,欢迎联系我们的团队", + "name": "姓名", + "email": "邮箱", + "message": "消息", + "submit": "提交" + }, "AuthPage": { "login": { "title": "登录", diff --git a/src/app/[locale]/(marketing)/(pages)/contact/page.tsx b/src/app/[locale]/(marketing)/(pages)/contact/page.tsx new file mode 100644 index 0000000..5aa72c8 --- /dev/null +++ b/src/app/[locale]/(marketing)/(pages)/contact/page.tsx @@ -0,0 +1,65 @@ +"use client"; + +import { Button } from '@/components/ui/button'; +import { Card } from '@/components/ui/card'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { Textarea } from '@/components/ui/textarea'; +import { useTranslations } from 'next-intl'; + +/** + * https://nsui.irung.me/contact + */ +export default function ContactPage() { + const t = useTranslations('ContactPage'); + + return ( +
+ {/* Header */} +
+

+ {t('title')} +

+

+ {t('subtitle')} +

+
+ + {/* Form */} + +
+

+ {t('formDescription')} +

+
+ +
+
+ + +
+ +
+ + +
+ +
+ +