Add theme system for customizable backgrounds

- Move backgrounds to themed folders (backgrounds/desert/, backgrounds/custom/)
- Add theme config option in config.json (default: "desert")
- Add /api/config endpoint to serve theme and location
- Update pixel-view.js to load backgrounds from theme folder
- Add config.json.example for reference
- Update CONFIG.md documentation

Users can now set "theme": "custom" and place their own backgrounds
in backgrounds/custom/ to customize the view for their location.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
root
2026-01-20 12:03:37 -08:00
parent 96ce78accc
commit 1f8b69e846
10 changed files with 140 additions and 26 deletions

View File

@@ -0,0 +1,35 @@
# Custom Backgrounds
Place your custom background images in this folder.
## Required Files
You need to provide 4 directional background images:
- `north.png` - View looking north
- `east.png` - View looking east
- `south.png` - View looking south
- `west.png` - View looking west
## Image Specifications
- **Dimensions:** 1536 x 1024 pixels
- **Format:** PNG with transparency support
- **Orientation:** Each image should show the horizon/landscape as seen when facing that cardinal direction from your location
## Tips
- Include a horizon line in each image - the sun and moon will set behind it
- Keep the upper portion (sky area) relatively simple for aircraft visibility
- The bottom portion can have more detail (terrain, buildings, etc.)
- Consider your local landmarks and terrain for each direction
## Enabling Custom Theme
Set the theme in `config.json`:
```json
{
"theme": "custom"
}
```
Then restart the server.

BIN
backgrounds/desert/east.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
backgrounds/desert/west.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB