Serve public landing page at root

This commit is contained in:
Randy 2026-03-30 08:55:39 -04:00
parent e5a543ec42
commit b0008c7207
1 changed files with 31 additions and 0 deletions

31
app.py
View File

@ -63,6 +63,37 @@ def add_noindex_header(response):
@app.route("/") @app.route("/")
def index(): def index():
return Response(
"""<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<title>FBN Residential</title>
<style>
body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #0f1117; color: #e1e4ed; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', system-ui, sans-serif; }
main { text-align: center; padding: 32px; max-width: 420px; }
a { display: inline-block; margin-top: 16px; padding: 12px 18px; border-radius: 8px; background: #60a5fa; color: #0f1117; font-weight: 600; text-decoration: none; }
p { color: #8b8fa3; line-height: 1.5; }
</style>
</head>
<body>
<main>
<h1>FBN Residential</h1>
<p>This dashboard is private. Continue to the protected page and enter the shared password in your browser prompt.</p>
<a href="/dashboard">Open Dashboard</a>
</main>
</body>
</html>
""",
200,
{"Content-Type": "text/html; charset=utf-8"},
)
@app.route("/dashboard")
def dashboard():
if not _authorized(request): if not _authorized(request):
return _unauthorized() return _unauthorized()
return render_template("dashboard.html") return render_template("dashboard.html")