diff --git a/src/pages/BlogDetailPage.tsx b/src/pages/BlogDetailPage.tsx new file mode 100644 index 0000000..1d6d94b --- /dev/null +++ b/src/pages/BlogDetailPage.tsx @@ -0,0 +1,15 @@ +import { useParams } from 'react-router-dom'; +import SEOHead from '../components/seo/SEOHead'; + +export default function BlogDetailPage() { + const { slug } = useParams<{ slug: string }>(); + return ( + <> + +
+

{slug?.replace(/-/g, ' ')}

+

Content coming soon.

+
+ + ); +} diff --git a/src/pages/BlogListPage.tsx b/src/pages/BlogListPage.tsx new file mode 100644 index 0000000..e15f664 --- /dev/null +++ b/src/pages/BlogListPage.tsx @@ -0,0 +1,35 @@ +import { Link } from 'react-router-dom'; +import SEOHead from '../components/seo/SEOHead'; +import { useLanguage } from '../contexts/LanguageContext'; + +const posts = [ + { + slug: 'introducing-texpixel', + title: 'Introducing TexPixel', + titleZh: 'TexPixel 介绍', + description: 'Meet TexPixel — your AI-powered formula recognition tool', + descriptionZh: '认识 TexPixel — 你的 AI 公式识别工具', + date: '2026-03-25', + }, +]; + +export default function BlogListPage() { + const { language } = useLanguage(); + return ( + <> + +
+

{language === 'en' ? 'Blog' : '博客'}

+
+ {posts.map((post) => ( + +
{post.date}
+

{language === 'en' ? post.title : post.titleZh}

+

{language === 'en' ? post.description : post.descriptionZh}

+ + ))} +
+
+ + ); +} diff --git a/src/pages/DocDetailPage.tsx b/src/pages/DocDetailPage.tsx new file mode 100644 index 0000000..18cab51 --- /dev/null +++ b/src/pages/DocDetailPage.tsx @@ -0,0 +1,15 @@ +import { useParams } from 'react-router-dom'; +import SEOHead from '../components/seo/SEOHead'; + +export default function DocDetailPage() { + const { slug } = useParams<{ slug: string }>(); + return ( + <> + +
+

{slug?.replace(/-/g, ' ')}

+

Content coming soon.

+
+ + ); +} diff --git a/src/pages/DocsListPage.tsx b/src/pages/DocsListPage.tsx new file mode 100644 index 0000000..3708997 --- /dev/null +++ b/src/pages/DocsListPage.tsx @@ -0,0 +1,27 @@ +import { Link } from 'react-router-dom'; +import SEOHead from '../components/seo/SEOHead'; +import { useLanguage } from '../contexts/LanguageContext'; + +const docs = [ + { slug: 'getting-started', title: 'Getting Started', titleZh: '快速开始', description: 'Learn how to use TexPixel for formula recognition', descriptionZh: '了解如何使用 TexPixel 进行公式识别' }, +]; + +export default function DocsListPage() { + const { language } = useLanguage(); + return ( + <> + +
+

{language === 'en' ? 'Documentation' : '文档'}

+
+ {docs.map((doc) => ( + +

{language === 'en' ? doc.title : doc.titleZh}

+

{language === 'en' ? doc.description : doc.descriptionZh}

+ + ))} +
+
+ + ); +} diff --git a/src/routes/AppRouter.tsx b/src/routes/AppRouter.tsx index 56fc65c..ec6d4c9 100644 --- a/src/routes/AppRouter.tsx +++ b/src/routes/AppRouter.tsx @@ -1,12 +1,40 @@ +import { lazy, Suspense } from 'react'; import { Routes, Route } from 'react-router-dom'; -import App from '../App'; +import MarketingLayout from '../components/layout/MarketingLayout'; +import AppLayout from '../components/layout/AppLayout'; import AuthCallbackPage from '../pages/AuthCallbackPage'; +const HomePage = lazy(() => import('../pages/HomePage')); +const WorkspacePage = lazy(() => import('../pages/WorkspacePage')); +const DocsListPage = lazy(() => import('../pages/DocsListPage')); +const DocDetailPage = lazy(() => import('../pages/DocDetailPage')); +const BlogListPage = lazy(() => import('../pages/BlogListPage')); +const BlogDetailPage = lazy(() => import('../pages/BlogDetailPage')); + +function LoadingFallback() { + return ( +
+
+
+ ); +} + export default function AppRouter() { return ( - - } /> - } /> - + }> + + }> + } /> + } /> + } /> + } /> + } /> + + }> + } /> + + } /> + + ); }