feat: persona-specific favicon + fix favicon.ico 404
app.js updates the <link rel="icon"> to the active persona's emoji on load (CORTEX_EMOJI is already injected server-side). /favicon.ico route added as a fallback for login/settings/help pages that don't have persona context. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,20 @@ def _first_persona(username: str) -> str | None:
|
||||
return names[0] if names else None
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Favicon — default sparkle; persona pages override via JS
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
_FAVICON_SVG = (
|
||||
"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'>"
|
||||
"<text y='.9em' font-size='90'>✨</text></svg>"
|
||||
)
|
||||
|
||||
@router.get("/favicon.ico", include_in_schema=False)
|
||||
async def favicon():
|
||||
return Response(content=_FAVICON_SVG, media_type="image/svg+xml")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Root redirect
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user