feat: integrate user manual into help section

This commit is contained in:
2026-07-28 12:15:38 +02:00
parent 41dbb6297c
commit 8903452e96
8 changed files with 409 additions and 4 deletions
+45 -1
View File
@@ -9,6 +9,7 @@ This README is intended for developers maintaining the project, not for end user
- Python 3
- Flask 2.3.3
- Flask-HTTPAuth 4.8.0
- markdown-it-py 3.0.0 for server-side Markdown rendering
- Vanilla HTML, CSS, and JavaScript
- JSON files for product data and forklift/load rules
@@ -58,7 +59,9 @@ The app uses HTTP Basic Auth. Current users are defined in `BETA_USERS` in `app.
├── fix_article_data.py
├── service-worker.js
├── templates/
│ └── roll_calculator.html
│ ├── help_index.html
│ ├── roll_calculator.html
│ └── user_manual.html
├── static/
│ ├── article-data.json
│ ├── config.json
@@ -71,6 +74,9 @@ The app uses HTTP Basic Auth. Current users are defined in `BETA_USERS` in `app.
│ ├── rollcalc_stddev_ranges.js
│ └── rollcalc_stddev_integration.js
└── docs/
├── de/
│ ├── screenshots/
│ └── user_manual.md
├── DEPLOYMENT_GUIDE.md
├── QOL_UPDATE_SUMMARY.md
├── STDDEV_IMPLEMENTATION_CHECKLIST.md
@@ -86,6 +92,9 @@ Implemented routes:
| Route | Methods | Auth | Purpose |
| --- | --- | --- | --- |
| `/` | `GET` | Basic Auth | Renders `templates/roll_calculator.html`. |
| `/help` | `GET` | Basic Auth | Renders the Help landing page. |
| `/help/user-manual` | `GET` | Basic Auth | Reads `docs/de/user_manual.md`, renders it as HTML, and displays it in the RollCalc Help layout. |
| `/help/user-manual/screenshots/<path:filename>` | `GET` | Basic Auth | Serves German user-manual screenshots from `docs/de/screenshots/` only. |
| `/static/<path:filename>` | `GET` | Basic Auth | Intended protected static-file serving from `static/`. |
| `/api/health` | `GET` | Basic Auth | Returns app health and version. |
| `/api/user` | `GET` | Basic Auth | Returns current authenticated user info. |
@@ -109,6 +118,41 @@ Do not commit real passwords or print them in logs.
Access logging is handled by `log_access()`, which reads `access_log.json`, appends a record, and writes the whole file back.
## Help and User Manual
RollCalc exposes an authenticated Help area at:
```text
/help
```
The user manual is available at:
```text
/help/user-manual
```
`docs/de/user_manual.md` is the leading source for the German user manual. The app reads this Markdown file on request and renders it server-side with `markdown-it-py`; no generated static HTML copy is maintained. Raw HTML in the Markdown source is disabled during rendering.
The documentation directory is prepared for additional languages:
```text
docs/
de/
user_manual.md
screenshots/
```
The public route `/help/user-manual` currently opens the German manual. No language switcher is implemented yet.
Screenshots referenced from the manual as `screenshots/filename.png` should be placed in:
```text
docs/de/screenshots/
```
The application rewrites those relative Markdown image paths to the authenticated manual screenshot route, which is limited to the active language's screenshot directory.
## Frontend Entry Point
The active UI is `templates/roll_calculator.html`.