docs: update CLAUDE.md with frontend design system and test gotchas
This commit is contained in:
@@ -49,7 +49,9 @@ Flask app using the factory pattern (`create_app()` in `app/__init__.py`). The D
|
||||
- `total_minutes()` on `WorkEntry` sums `TimeSlot` durations, handles midnight crossing
|
||||
- Frais réels: uses `bareme_kilometrique` tranches from config.toml; `km_max = 0` means "no upper limit"
|
||||
|
||||
**Frontend:** Tailwind CSS and HTMX loaded from CDN in `base.html`. No build step. JavaScript is inline in templates (only `entry_form.html` has JS for dynamic time slots and journey section visibility).
|
||||
**Frontend:** Tailwind CSS CDN + HTMX in `base.html`. No build step. Design system defined via CSS variables (`--ink`, `--amber`, `--sage`, `--rust`, `--cream`) and custom classes (`.card`, `.card-*`, `.btn-primary`, `.field-input`, `.font-display`, `.font-data`) — all in `base.html <style>`. JS inline in `entry_form.html` only.
|
||||
|
||||
**Tailwind CDN limitation:** Dynamic Jinja2 classes (e.g. `class="{{ var }}"`) are not included by the CDN. Use `style=` inline for dynamic colors.
|
||||
|
||||
**Auth:** Handled entirely by HAProxy upstream. The app has no authentication.
|
||||
|
||||
@@ -63,3 +65,4 @@ Flask app using the factory pattern (`create_app()` in `app/__init__.py`). The D
|
||||
- **Dates en français** : `strftime` utilise la locale système (anglais). Utiliser le filtre Jinja2 `{{ date | date_fr }}` défini dans `app/__init__.py`.
|
||||
- **`db.get_engine()` deprecated** en Flask-SQLAlchemy 3.x → utiliser `db.engine`.
|
||||
- **Migration `_migrate_db`** : vérifier l'existence de la table avant `ALTER TABLE` — SQLite peut avoir un fichier DB sans tables (ex: premier démarrage avec `instance/worklog.db` vide).
|
||||
- **Tests de routes** : `test_routes.py` vérifie des chaînes de la réponse HTML (ex: titre de page). Si une page est renommée, mettre à jour ces assertions en conséquence.
|
||||
|
||||
Reference in New Issue
Block a user