From af65171d8777074038c75f3bc572a4ddf872b364 Mon Sep 17 00:00:00 2001 From: Erik Thiele Date: Fri, 31 Jul 2026 12:14:37 +0200 Subject: [PATCH] Add a favicon Simple SVG icon matching the app's look: a link/chain glyph in white on the indigo accent color, same rounded-square shape as the card avatars. Mounts a new /static route via StaticFiles and references it from base.html's . Co-Authored-By: Claude Sonnet 5 --- app/main.py | 4 ++++ app/static/favicon.svg | 9 +++++++++ app/templates/base.html | 1 + 3 files changed, 14 insertions(+) create mode 100644 app/static/favicon.svg diff --git a/app/main.py b/app/main.py index d6fff02..679fa86 100644 --- a/app/main.py +++ b/app/main.py @@ -5,6 +5,7 @@ from urllib.parse import quote, urlparse from fastapi import Depends, FastAPI, File, Form, Request, UploadFile from fastapi.responses import HTMLResponse, RedirectResponse, Response +from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates from markupsafe import Markup from sqlalchemy import func, select, text @@ -45,6 +46,9 @@ if config.DATABASE_URL.startswith("sqlite"): app = FastAPI(title="LinkVault") app.add_middleware(SessionMiddleware, secret_key=config.SECRET_KEY, max_age=60 * 60 * 24 * 14) +app.mount( + "/static", StaticFiles(directory=str(Path(__file__).parent / "static")), name="static" +) templates = Jinja2Templates(directory=str(Path(__file__).parent / "templates")) templates.env.globals.update( diff --git a/app/static/favicon.svg b/app/static/favicon.svg new file mode 100644 index 0000000..f01d872 --- /dev/null +++ b/app/static/favicon.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/app/templates/base.html b/app/templates/base.html index dea1ba3..594ad7b 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -4,6 +4,7 @@ {% block title %}LinkVault{% endblock %} +