diff options
| author | Bertrand Yuan <me@bertyuan.com> | 2026-04-27 20:52:54 +0800 |
|---|---|---|
| committer | Bertrand Yuan <me@bertyuan.com> | 2026-04-27 20:53:14 +0800 |
| commit | dbb5e791f0c228369605d126dd590962ebe1eddc (patch) | |
| tree | 8c83fc84bd9547630e6733929dec77e102e055a8 /Documentation/source/zh_TW/frontend.rst | |
| parent | 658798b3a2378bb6df16cfbb16d707c6fb719e1e (diff) | |
docs: add comprehensive documentation for operations
This commit introduces a complete set of documentation files
covering various aspects of the project, including environment
setup, quality checks, command references, and architecture.
The documentation is structured to assist developers and
contributors in understanding the project's configuration,
workflow, and best practices.
Additionally, translations for Simplified and Traditional
Chinese have been added to ensure accessibility for a wider
audience. This enhances the overall usability and
maintainability of the project.
Signed-off-by: Bertrand Yuan <github@bertyuan.com>
Diffstat (limited to 'Documentation/source/zh_TW/frontend.rst')
| -rw-r--r-- | Documentation/source/zh_TW/frontend.rst | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Documentation/source/zh_TW/frontend.rst b/Documentation/source/zh_TW/frontend.rst new file mode 100644 index 0000000..b13a747 --- /dev/null +++ b/Documentation/source/zh_TW/frontend.rst @@ -0,0 +1,49 @@ +前端 +==== + +頁面職責 +-------- + +.. list-table:: + :header-rows: 1 + :widths: 22 34 44 + + * - 路由 + - 主要檔案 + - 職責 + * - ``/`` + - ``src/app/(main)/(home)/page.tsx`` + - 首頁,包含 Hero、最新文章和 Newsletter CTA。 + * - ``/posts`` + - ``src/app/(main)/(home)/posts/page.tsx`` + - 已發布文章的分頁列表。 + * - ``/posts/[slug]`` + - ``src/app/(main)/(home)/posts/[slug]/page.tsx`` + - 文章詳情、富文字、metadata、分享和留言。 + * - ``/tags`` + - ``src/app/(main)/(home)/tags/page.tsx`` + - 標籤索引與文章數量。 + * - ``/tags/[tag]`` + - ``src/app/(main)/(home)/tags/[...slug]/page.tsx`` + - 按標籤篩選的文章列表。 + * - ``/login`` + - ``src/app/(main)/(auth)/login/page.tsx`` + - OAuth 登入入口。 + +UI 原則 +------- + +* 閱讀優先:排版、行寬和對比度應服務長文閱讀。 +* 導航輕量:文章、標籤、搜尋、主題切換和帳號入口應容易找到。 +* 視覺一致:延續虛線邊框、角標和克制動效。 +* 跨端一致:行動端和桌面端保持相同資訊層級。 + +元件約定 +-------- + +新增元件前先檢查 ``src/components/ui`` 和現有頁面元件。共用元件應接收正規化 props,資料取得應放在 Server Component 或 ``src/lib`` helper 中。圖示按鈕必須有明確的可存取名稱。 + +可存取性 +-------- + +自訂控制項要保留鍵盤焦點;圖示按鈕和連結需要可讀名稱;淺色和深色主題都要保持足夠對比度;表單必須覆蓋空、載入、成功和錯誤狀態。 |
