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:
21
CLAUDE.md
21
CLAUDE.md
@@ -15,7 +15,7 @@ python generate_report.py
|
||||
|
||||
Generate report with custom options:
|
||||
```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
|
||||
@@ -23,12 +23,16 @@ python generate_report.py --db pga.db --output report.html --top 10 --background
|
||||
**Report generator (`generate_report.py`):**
|
||||
- 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
|
||||
- Loads HTML template from external file (default: `platinum.html`)
|
||||
- Loads HTML template from `templates/` folder (default: `templates/platinum.html`)
|
||||
|
||||
**HTML template (`platinum.html`):**
|
||||
- Chart.js doughnut charts and dynamic JavaScript filtering
|
||||
- Mac OS 9 Platinum visual style with placeholder tokens for assets
|
||||
- Tokens like `__ALL_GAMES__`, `__BACKGROUND_IMAGE__` are replaced at generation time
|
||||
**HTML templates (`templates/`):**
|
||||
- **platinum.html**: Mac OS 9 Platinum visual style
|
||||
- **brutalism.html**: Bold industrial brutalist design with hard shadows
|
||||
- **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`):**
|
||||
- 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
|
||||
- Client-side filtering by service (Steam, GOG, itch.io, local)
|
||||
- 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
|
||||
|
||||
- Games have a `service` field (steam, gog, itchio, humblebundle, or NULL for local)
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user