Unify modern templates into single template with style system
- Create templates/modern.html as unified base for brutalism, glassmorphism, neumorphism - Add styles.py with CSS and chart config for each style - Add --style argument to generate_report.py (overrides --template) - Remove individual brutalism.html, glassmorphism.html, neumorphism.html - Keep platinum.html separate due to unique Mac OS 9 structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
29
CLAUDE.md
29
CLAUDE.md
@@ -13,9 +13,21 @@ Generate report with defaults:
|
||||
python generate_report.py
|
||||
```
|
||||
|
||||
Generate report with custom options:
|
||||
Generate report with modern style:
|
||||
```bash
|
||||
python generate_report.py --db pga.db --output report.html --top 10 --background background.png --template templates/platinum.html
|
||||
python generate_report.py --style glassmorphism --output report.html
|
||||
python generate_report.py --style brutalism --output report.html
|
||||
python generate_report.py --style neumorphism --output report.html
|
||||
```
|
||||
|
||||
Generate report with legacy Platinum template:
|
||||
```bash
|
||||
python generate_report.py --template templates/platinum.html --output report.html
|
||||
```
|
||||
|
||||
All options:
|
||||
```bash
|
||||
python generate_report.py --db pga.db --output report.html --top 10 --background background.png --style glassmorphism
|
||||
```
|
||||
|
||||
## Architecture
|
||||
@@ -26,13 +38,16 @@ python generate_report.py --db pga.db --output report.html --top 10 --background
|
||||
- Loads HTML template from `templates/` folder (default: `templates/platinum.html`)
|
||||
|
||||
**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
|
||||
- **modern.html**: Unified template for modern styles (brutalism, glassmorphism, neumorphism)
|
||||
- **platinum.html**: Legacy Mac OS 9 Platinum visual style (separate template due to unique structure)
|
||||
- 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
|
||||
- Modern templates support light/dark/auto theme toggle button
|
||||
|
||||
**Style system (`styles.py`):**
|
||||
- CSS definitions for each modern style (brutalism, glassmorphism, neumorphism)
|
||||
- Theme configurations (colors, fonts, chart options) injected via `__THEME_CSS__` and `__THEME_CONFIG__`
|
||||
- Use `--style` argument to select a modern style instead of `--template`
|
||||
|
||||
**Database schema (`schema.py`):**
|
||||
- Reference file documenting Lutris database structure
|
||||
|
||||
Reference in New Issue
Block a user