BGG: Powered-by-Logo im Footer (Lizenzpflicht) + Erscheinungsjahr-Filter (Standard aktuelles Jahr+)

This commit is contained in:
Flo Hartmann
2026-08-25 12:11:06 +00:00
parent 667196a4ba
commit ca6d94938c
8 changed files with 69 additions and 4 deletions

View File

@@ -16,6 +16,7 @@ from pathlib import Path
from fastapi import FastAPI, Request
from fastapi.responses import RedirectResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, select_autoescape
from sqlalchemy import func, select
@@ -109,6 +110,10 @@ def create_app(settings: Settings | None = None) -> FastAPI:
redoc_url=None,
openapi_url=None,
)
# Statische Kern-Dateien (z. B. „Powered by BGG“-Logo, Pflicht für
# öffentliche BGG-XML-API-Anwendungen).
statisch = Path(__file__).parent / "static"
app.mount("/static", StaticFiles(directory=statisch), name="statisch")
app.state.settings = settings
app.state.engine = engine
app.state.session_factory = session_factory

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -73,6 +73,12 @@
</main>
<footer class="text-center text-xs text-slate-400 py-4">
{{ app_name }} &middot; Plugin-Anzahl: {{ geladene_plugins|length }}
<div class="mt-2">
<a href="https://boardgamegeek.com" target="_blank" rel="noopener noreferrer">
<img src="/static/powered-by-bgg.png" alt="Powered by BoardGameGeek"
width="120" height="35" class="inline-block opacity-80 hover:opacity-100">
</a>
</div>
</footer>
</body>
</html>