Serve the rulebook as a static HTML page from FastAPI

Replace the SPA Rules route with a self-contained src/pirats/rules.html
served at GET /rules (registered before the SPA mount, included in
package data for the Nix build). Plain anchor links replace the
scrollIntoView workaround since there's no hash router to fight. The
corner Rules link and splash-page link now point at /rules, and the
Vite dev server proxies /rules to the backend like /api.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 01:35:04 -07:00
parent 69e7d24e10
commit 683c60fff9
8 changed files with 237 additions and 274 deletions

View File

@@ -27,7 +27,7 @@ pirats = "pirats.main:main"
where = ["src"]
[tool.setuptools.package-data]
pirats = ["static/**/*"]
pirats = ["static/**/*", "rules.html"]
[tool.pytest.ini_options]
pythonpath = ["src"]