feat(frontend): T44 setup FastAPI static files and templates

- Mount static files on /static endpoint
- Configure Jinja2Templates with directory structure
- Create base template with Pico.css, HTMX, Chart.js
- Create all template subdirectories (auth, dashboard, keys, tokens, profile, components)
- Create initial CSS and JS files
- Add tests for static files and templates configuration

Tests: 12 passing
Coverage: 100% on new configuration code
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-07 17:58:03 +02:00
parent 3ae5d736ce
commit c1f47c897f
16 changed files with 1592 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
<nav class="container-fluid">
<ul>
<li><strong><a href="/" class="navbar-brand">OpenRouter Monitor</a></strong></li>
</ul>
<ul>
{% if user %}
<li><a href="/dashboard">Dashboard</a></li>
<li><a href="/keys">API Keys</a></li>
<li><a href="/tokens">Tokens</a></li>
<li><a href="/profile">Profile</a></li>
<li>
<form action="/logout" method="POST" style="display: inline;" hx-post="/logout" hx-redirect="/login">
<button type="submit" class="outline">Logout</button>
</form>
</li>
{% else %}
<li><a href="/login">Login</a></li>
<li><a href="/register" role="button">Register</a></li>
{% endif %}
</ul>
</nav>