79 lines
2.2 KiB
Python
79 lines
2.2 KiB
Python
from flask import Flask, render_template_string
|
|
|
|
app = Flask(__name__)
|
|
|
|
MAINTENANCE_MESSAGE = """
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Wartungsarbeiten</title>
|
|
<style>
|
|
body {
|
|
min-height: 100vh;
|
|
margin: 0;
|
|
background: linear-gradient(135deg, #232526 0%, #414345 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-family: 'Segoe UI', Arial, sans-serif;
|
|
}
|
|
.container {
|
|
background: #18191a;
|
|
padding: 2.5rem 3.5rem;
|
|
border-radius: 18px;
|
|
box-shadow: 0 6px 32px rgba(0,0,0,0.32);
|
|
text-align: center;
|
|
max-width: 420px;
|
|
border: 1px solid #232526;
|
|
}
|
|
h1 {
|
|
color: #00bfae;
|
|
font-size: 2.2rem;
|
|
margin-bottom: 1.2rem;
|
|
letter-spacing: 1px;
|
|
}
|
|
p {
|
|
color: #e0e0e0;
|
|
font-size: 1.1rem;
|
|
margin-bottom: 0.8rem;
|
|
}
|
|
a {
|
|
color: #00bfae;
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
transition: color 0.2s;
|
|
}
|
|
a:hover {
|
|
color: #00e6d0;
|
|
text-decoration: underline;
|
|
}
|
|
@media (max-width: 600px) {
|
|
.container {
|
|
padding: 1.2rem 0.5rem;
|
|
max-width: 98vw;
|
|
}
|
|
h1 { font-size: 1.4rem; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Wartungsarbeiten</h1>
|
|
<p>Die Website <a href="https://projekt-senegal.de/">projekt-senegal.de</a> ist derzeit wegen Wartungsarbeiten nicht erreichbar.</p>
|
|
<p>Wir sind bald wieder für Sie da.<br>Vielen Dank für Ihr Verständnis!</p>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
"""
|
|
|
|
# Alle Pfade auf die Wartungsseite routen
|
|
@app.route("/", defaults={"path": ""})
|
|
@app.route("/<path:path>")
|
|
def maintenance(path=None):
|
|
return render_template_string(MAINTENANCE_MESSAGE), 503
|
|
|
|
if __name__ == "__main__":
|
|
app.run(host="0.0.0.0", port=5000)
|