diff --git a/index.html b/index.html index aa2caa4..e7029c2 100644 --- a/index.html +++ b/index.html @@ -614,7 +614,7 @@ footer{padding:50px 60px;background:var(--navy);color:rgba(255,255,255,.6);font- \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 5472894..3184ae7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,15 +4,16 @@ Sliding — {% block title %}{% endblock %} +
SLIDING · Pernod Ricard - +
{% block content %}{% endblock %}
-
Le NAS travaille…
+
L'agent travaille…
diff --git a/webapp_sliding.py b/webapp_sliding.py index 8af84df..9bb86fb 100644 --- a/webapp_sliding.py +++ b/webapp_sliding.py @@ -427,6 +427,22 @@ async def download(request): "presentationml.presentation") +async def layouts_gallery(request): + """Catalogue des layouts — l'index.html généré par build_gallery.py, + servi tel quel (toujours à jour après une régénération).""" + guard = require_login(request) + if guard: + return guard + page = BASE / "index.html" + if not page.exists(): + return HTMLResponse( + '

Galerie ' + 'absente — lancer python3 build_gallery.py ' + 'sur le NAS.

', status_code=404) + return FileResponse(str(page), media_type="text/html", + headers={"Cache-Control": "no-store"}) + + async def health(request): return JSONResponse({"status": "ok", "server": "webapp-sliding", "version": "1.0.0"}) @@ -448,6 +464,7 @@ app = Starlette(routes=[ Route("/p/{slug}/revise", revise, methods=["POST"]), Route("/p/{slug}/previews/{name}", preview_png, methods=["GET"]), Route("/p/{slug}/download", download, methods=["GET"]), + Route("/layouts", layouts_gallery, methods=["GET"]), Route("/health", health, methods=["GET"]), Mount("/static", StaticFiles(directory=str(BASE / "static")), name="static"),