Add a help link and bug-report button to the user navbar
Serves docs/guida-utente.md as plain text at GET /guida (no markdown rendering, kept simple) and links it from the navbar next to a "Segnala un bug" button. The bug-report link is a placeholder GitHub issues URL (REPLACE_ME) until a real repo exists. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,4 +95,12 @@ async def admin_panel() -> FileResponse:
|
|||||||
return FileResponse("app/static/admin.html", headers=_NO_STORE_HEADERS)
|
return FileResponse("app/static/admin.html", headers=_NO_STORE_HEADERS)
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/guida", include_in_schema=False)
|
||||||
|
async def user_guide() -> FileResponse:
|
||||||
|
"""Serves docs/guida-utente.md as plain text so it opens inline in the
|
||||||
|
browser (no markdown rendering — keeps this simple), linked from the
|
||||||
|
navbar's help button in app/static/index.html."""
|
||||||
|
return FileResponse("docs/guida-utente.md", media_type="text/plain; charset=utf-8")
|
||||||
|
|
||||||
|
|
||||||
app.mount("/", StaticFiles(directory="app/static", html=True), name="static")
|
app.mount("/", StaticFiles(directory="app/static", html=True), name="static")
|
||||||
|
|||||||
@@ -90,12 +90,12 @@
|
|||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
button.link {
|
button.link, a.link {
|
||||||
width: auto; margin-top: 0; padding: 0; min-height: auto;
|
width: auto; margin-top: 0; padding: 0; min-height: auto;
|
||||||
background: none; color: var(--color-muted-foreground); font-weight: 500;
|
background: none; color: var(--color-muted-foreground); font-weight: 500;
|
||||||
font-size: 0.85rem; text-decoration: underline;
|
font-size: 0.85rem; text-decoration: underline;
|
||||||
}
|
}
|
||||||
button.link:hover { filter: none; color: var(--color-foreground); }
|
button.link:hover, a.link:hover { filter: none; color: var(--color-foreground); }
|
||||||
|
|
||||||
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
||||||
|
|
||||||
@@ -293,6 +293,8 @@
|
|||||||
<span class="brand">PLM Lottery</span>
|
<span class="brand">PLM Lottery</span>
|
||||||
<div class="app-navbar-account">
|
<div class="app-navbar-account">
|
||||||
<span class="name" id="dash-username"></span>
|
<span class="name" id="dash-username"></span>
|
||||||
|
<a class="link" href="/guida" target="_blank" rel="noopener">Guida</a>
|
||||||
|
<a class="link" href="https://github.com/REPLACE_ME/plm-lottery/issues/new" target="_blank" rel="noopener">Segnala un bug</a>
|
||||||
<button class="link" onclick="logout()">Esci</button>
|
<button class="link" onclick="logout()">Esci</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user