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:
21
templates/components/navbar.html
Normal file
21
templates/components/navbar.html
Normal 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>
|
||||
Reference in New Issue
Block a user