Update CLAUDE.md documentation

- Document all four available templates (platinum, brutalism, glassmorphism, neumorphism)
- Fix template path to use templates/ folder
- Update theme toggle description (auto/light/dark with persistent preference)
- Add responsive design mention
- Fix filtered categories list

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Miguel Astor
2026-02-26 17:29:28 -04:00
parent f4e5c33c87
commit aa9719cbfe

View File

@@ -15,7 +15,7 @@ python generate_report.py
Generate report with custom options: Generate report with custom options:
```bash ```bash
python generate_report.py --db pga.db --output report.html --top 10 --background background.png --template platinum.html python generate_report.py --db pga.db --output report.html --top 10 --background background.png --template templates/platinum.html
``` ```
## Architecture ## Architecture
@@ -23,12 +23,16 @@ python generate_report.py --db pga.db --output report.html --top 10 --background
**Report generator (`generate_report.py`):** **Report generator (`generate_report.py`):**
- Reads Lutris SQLite database (`pga.db`) containing games, categories, and playtime data - Reads Lutris SQLite database (`pga.db`) containing games, categories, and playtime data
- Embeds all data (games JSON, background image as base64) directly into a self-contained HTML file - Embeds all data (games JSON, background image as base64) directly into a self-contained HTML file
- Loads HTML template from external file (default: `platinum.html`) - Loads HTML template from `templates/` folder (default: `templates/platinum.html`)
**HTML template (`platinum.html`):** **HTML templates (`templates/`):**
- Chart.js doughnut charts and dynamic JavaScript filtering - **platinum.html**: Mac OS 9 Platinum visual style
- Mac OS 9 Platinum visual style with placeholder tokens for assets - **brutalism.html**: Bold industrial brutalist design with hard shadows
- Tokens like `__ALL_GAMES__`, `__BACKGROUND_IMAGE__` are replaced at generation time - **glassmorphism.html**: Modern frosted glass effect
- **neumorphism.html**: Soft 3D neumorphic style
- All templates use Chart.js doughnut charts and dynamic JavaScript filtering
- Placeholder tokens like `__ALL_GAMES__`, `__BACKGROUND_IMAGE__` are replaced at generation time
- Support light/dark mode with theme toggle button
**Database schema (`schema.py`):** **Database schema (`schema.py`):**
- Reference file documenting Lutris database structure - Reference file documenting Lutris database structure
@@ -38,11 +42,12 @@ python generate_report.py --db pga.db --output report.html --top 10 --background
- Fully static, can be hosted on any web server - Fully static, can be hosted on any web server
- Client-side filtering by service (Steam, GOG, itch.io, local) - Client-side filtering by service (Steam, GOG, itch.io, local)
- Expandable "Others" row in games table - Expandable "Others" row in games table
- Light/dark mode support via CSS `prefers-color-scheme` - Light/dark/auto theme toggle button with persistent preference
- Responsive design for mobile and desktop
## Key Data Relationships ## Key Data Relationships
- Games have a `service` field (steam, gog, itchio, humblebundle, or NULL for local) - Games have a `service` field (steam, gog, itchio, humblebundle, or NULL for local)
- Games link to categories via `games_categories` join table - Games link to categories via `games_categories` join table
- Categories like `.hidden`, `favorite`, `Horny` are filtered out in the report - Categories like `.hidden` and `favorite` are filtered out in the report display
- `playtime` is cumulative hours (REAL), not per-session data - `playtime` is cumulative hours (REAL), not per-session data