Skip to content

Commit c2433b5

Browse files
committed
docs: add AGENTS.md for coding agents and rewrite README in Vietnamese
1 parent a1ff3a3 commit c2433b5

2 files changed

Lines changed: 75 additions & 27 deletions

File tree

‎AGENTS.md‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# AGENTS.md
2+
3+
Trang landing của Fcitx5 Lotus — bộ gõ tiếng Việt cho Linux. SPA Vue 3 + Vite + TypeScript, UI tiếng Việt, theme Catppuccin, deploy lên GitHub Pages qua GitHub Actions.
4+
5+
## Tech stack
6+
7+
- Vue 3 (Composition API, `<script setup lang="ts">`)
8+
- Vite 7, TypeScript, vue-router 4
9+
- Element Plus (auto-import), oh-vue-icons (`<v-icon>`), Bun
10+
11+
## Lệnh
12+
13+
- Cài đặt: `bun install`
14+
- Dev: `bun dev`
15+
- Lint: `bun run lint` / `bun run lint:fix`
16+
- Type-check: `bun run type-check`
17+
- Build: `bun run build` / Preview: `bun run preview`
18+
19+
Quan trọng: khi chỉ kiểm tra code, chạy `bun run lint` + `bun run type-check` là đủ — **KHÔNG build**. CI (`ci.yml`) chạy cả 3 khi push.
20+
21+
## Cấu trúc
22+
23+
- `src/views/Home.vue` — layout, chỉ render các section + `initTheme()`.
24+
- `src/components/` — 8 section (NavBar, HeroSection, FeaturesSection, InstallSection, UsageSection, UninstallSection, ContributorsSection, FooterSection) + reusable (FeatureCard, UsageTable, CodeBlock, UninstallItem, InteractiveInstaller).
25+
- `src/utils/` — `theme.ts` (useTheme), `github.ts` (useGitHubStats, cache localStorage 2h), `actions.ts` (openLink, copyToClipboard, scroll...).
26+
- `src/data/` — `installer.ts`, `usage.ts` (dữ liệu hiển thị).
27+
- `src/assets/shared.css` — reset, theme vars, class dùng chung (non-scoped, import ở main.ts).
28+
29+
## Quy ước
30+
31+
- Mọi text UI bằng tiếng Việt; import alias `@/`; icon qua `el-icon` hoặc `<v-icon name="...">`.
32+
- State dùng chung giữa section → composable singleton (useTheme/useGitHubStats); không props/emit giữa section.
33+
- CSS: riêng 1 section → `<style scoped>`; class dùng chung hoặc render bởi component con → `shared.css` (scoped của cha không áp dụng vào con). Override Element Plus dùng `:root .el-*` cho đủ specificity. Không tự thêm CSS mới cho class không có rule (`.flex`, `.mb-0`...).
34+
- Không sửa tay `components.d.ts` / `auto-imports.d.ts` (generated).
35+
- Project không có test suite; không thêm test nếu không được yêu cầu.
36+
37+
## Git
38+
39+
- Commit theo Conventional Commits: `feat(...)`, `fix(...)`, `refactor(...)`.
40+
- Chạy `bun run lint` + `bun run type-check` trước khi commit; chỉ commit khi được yêu cầu.
41+
42+
## Không được làm
43+
44+
- KHÔNG build khi chỉ kiểm tra code.
45+
- KHÔNG đổi logic/hành vi khi refactor (giao diện phải y hệt).
46+
- KHÔNG sửa text hiển thị trừ khi được yêu cầu.
47+
- KHÔNG thêm dependency mới mà chưa hỏi.
48+
- KHÔNG commit secrets.

‎README.md‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
# fcitx5-lotus-landing
1+
# Fcitx5 Lotus — Trang chủ
22

3-
This template should help get you started developing with Vue 3 in Vite.
3+
Trang web giới thiệu và hướng dẫn cài đặt cho [Fcitx5 Lotus](https://github.com/LotusInputMethod/fcitx5-lotus) — bộ gõ tiếng Việt hiện đại, hiệu năng cao cho Linux.
44

5-
## Recommended IDE Setup
5+
Trang chủ trực tiếp tại: https://lotusinputmethod.github.io/
66

7-
[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
7+
## Tính năng trang web
88

9-
## Recommended Browser Setup
9+
- Hero động với terminal mockup + thống kê GitHub (stars, contributors, phiên bản).
10+
- Installer tương tác: chọn distro/DE/shell/init → hướng dẫn cài đặt tương ứng.
11+
- Hướng dẫn sử dụng (tabs): cài đặt nhanh, cài đặt nâng cao, chế độ gõ, mẹo hay.
12+
- Hướng dẫn gỡ cài đặt theo từng distro.
13+
- Danh sách contributor tải từ GitHub (cache 2 giờ).
1014

11-
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
12-
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13-
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14-
- Firefox:
15-
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16-
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
15+
## Tech stack
1716

18-
## Type Support for `.vue` Imports in TS
17+
Vue 3 · Vite · TypeScript · Element Plus · oh-vue-icons · Bun · GitHub Pages
1918

20-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
19+
## Phát triển
2120

22-
## Customize configuration
23-
24-
See [Vite Configuration Reference](https://vite.dev/config/).
25-
26-
## Project Setup
21+
Yêu cầu: Node ≥ 20.19 (hoặc Bun).
2722

2823
```sh
29-
bun install
24+
bun install # cài phụ thuộc
25+
bun dev # chạy dev server
26+
bun run lint # kiểm tra eslint
27+
bun run type-check # kiểm tra TypeScript
28+
bun run build # build production
29+
bun run preview # xem bản build
3030
```
3131

32-
### Compile and Hot-Reload for Development
32+
## Triển khai
3333

34-
```sh
35-
bun dev
36-
```
34+
Push lên nhánh `main` → GitHub Actions (`deploy.yml`) tự build và deploy lên GitHub Pages.
3735

38-
### Type-Check, Compile and Minify for Production
36+
## Đóng góp
3937

40-
```sh
41-
bun run build
42-
```
38+
Mọi đóng góp đều được hoan nghênh — xem [CONTRIBUTING](https://github.com/LotusInputMethod/fcitx5-lotus/blob/main/CONTRIBUTING.md) của dự án chính.
39+
40+
## Giấy phép
41+
42+
GNU General Public License v3.0 — xem [LICENSE](LICENSE).

0 commit comments

Comments
 (0)