mirror of
https://github.com/tiennm99/mathmax.git
synced 2026-06-17 14:48:38 +00:00
ecd663ccc2a2785d91e8aef2e093b020beee8971
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) and [@sveltejs/vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte/tree/HEAD/packages/vite-plugin-svelte). These dependencies needed to be updated together. Updates `vite` from 5.4.21 to 8.0.10 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v8.0.10/packages/vite) Updates `@sveltejs/vite-plugin-svelte` from 4.0.4 to 7.0.0 - [Release notes](https://github.com/sveltejs/vite-plugin-svelte/releases) - [Changelog](https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/CHANGELOG.md) - [Commits](https://github.com/sveltejs/vite-plugin-svelte/commits/@sveltejs/vite-plugin-svelte@7.0.0/packages/vite-plugin-svelte) --- updated-dependencies: - dependency-name: vite dependency-version: 8.0.10 dependency-type: direct:production - dependency-name: "@sveltejs/vite-plugin-svelte" dependency-version: 7.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
MathMax
Toán tương tác cho học sinh THCS Việt Nam (lớp 6-9). Số học, Đại số, Hình học qua kéo-thả và minh hoạ trực quan.
Status
5 bài đã ra mắt — số học, đại số, hình học đều có ít nhất một bài.
- Lớp 6 — Ước chung lớn nhất (Euclid):
/so-hoc/uoc-chung-lon-nhat/ - Lớp 7 — Hiệu hai bình phương:
/dai-so/hieu-hai-binh-phuong/ - Lớp 7 — Tam giác bằng nhau (SSS):
/hinh-hoc/tam-giac-bang-nhau/ - Lớp 8 — Tam giác đồng dạng:
/hinh-hoc/tam-giac-dong-dang/ - Lớp 9 — Góc nội tiếp:
/hinh-hoc/goc-noi-tiep/
Develop
Yêu cầu: Node 24+, npm 11+.
npm install
npm run dev # http://localhost:5173/mathmax/
npm run test # Vitest (geom-engine unit tests)
npm run check # svelte-check + JSDoc strict
npm run build # Static output → build/
npm run preview # Serve build/
Deploy
Auto-deploy lên GitHub Pages từ main qua actions/deploy-pages@v4. Xem RUNBOOK.md để rollback / chuyển domain.
Live URL: https://tiennm99.github.io/mathmax/
Architecture
- Static: SvelteKit +
@sveltejs/adapter-static,paths.base = '/mathmax', outputbuild/. - Styling: Tailwind 3 (PostCSS) + Be Vietnam Pro (woff2 qua
@fontsource). Tick palettecolors.pair.{1,2,3}được khai báo trongtailwind.config.js. - Language: JavaScript only (Svelte 5, JSDoc qua
jsconfig.jsonvớicheckJs: true). - Math engines:
src/lib/geom-engine/(vec, triangle, circle, ticks) vàsrc/lib/numtheory-engine/(gcd, lcm, gcdSteps). Module thuần, không phụ thuộc DOM. Vitest unit tests đi kèm. - Math typography:
src/lib/components/tex.svelte— wrapper KaTeX duy nhất. SSR quarenderToString, không cần JS phía client để hiển thị. - Lessons: mỗi bài là một
+page.svelte; copy tiếng Việt colocate trongsrc/lib/lessons/<slug>/copy.vi.js. - Drag: Svelte action
use:draggable(src/lib/actions/draggable.svelte.js) — Pointer Events + bàn phím mũi tên cho a11y. - i18n: Hiện chỉ có tiếng Việt. Site chrome ở
src/lib/i18n/site.vi.js. English thêm sau bằng cách tạo*.en.jssong song.
License
Apache-2.0. Xem LICENSE.
Description
MathMax — Toán tương tác cho học sinh THCS Việt Nam (lớp 6-9). Static site.
Languages
Svelte
56.7%
JavaScript
42.6%
CSS
0.4%
HTML
0.3%