Split monolithic index.html and style.css for maintainability

- Extract 15 modals and 3 partials from index.html into Jinja2 templates
  (templates/modals/*.html, templates/partials/*.html)
- Split style.css (3,712 lines) into 11 feature-scoped CSS files under
  static/css/ (base, layout, components, cards, modal, calibration,
  dashboard, streams, patterns, profiles, tutorials)
- Switch root route from FileResponse to Jinja2Templates
- Add jinja2 dependency
- Consolidate duplicate @keyframes spin definition
- Browser receives identical assembled HTML — zero JS changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 00:42:50 +03:00
parent 755077607a
commit 2b90fafb9c
35 changed files with 4986 additions and 4990 deletions

View File

@@ -10,13 +10,11 @@ client = TestClient(app)
def test_root_endpoint():
"""Test root endpoint."""
"""Test root endpoint returns the HTML dashboard."""
response = client.get("/")
assert response.status_code == 200
data = response.json()
assert data["name"] == "WLED Screen Controller"
assert data["version"] == __version__
assert "/docs" in data["docs"]
assert "text/html" in response.headers["content-type"]
assert "LED Grab" in response.text
def test_health_check():