modified: app.py
This commit is contained in:
40
app.py
40
app.py
@@ -4,54 +4,51 @@ app = Flask(__name__)
|
||||
|
||||
MAINTENANCE_MESSAGE = """
|
||||
<!DOCTYPE html>
|
||||
<html lang=\"de\">
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset=\"UTF-8\">
|
||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||
<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, #e0eafc 0%, #cfdef3 100%);
|
||||
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: #fff;
|
||||
background: #18191a;
|
||||
padding: 2.5rem 3.5rem;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 6px 32px rgba(0,0,0,0.12);
|
||||
box-shadow: 0 6px 32px rgba(0,0,0,0.32);
|
||||
text-align: center;
|
||||
max-width: 420px;
|
||||
border: 1px solid #232526;
|
||||
}
|
||||
h1 {
|
||||
color: #00796b;
|
||||
color: #00bfae;
|
||||
font-size: 2.2rem;
|
||||
margin-bottom: 1.2rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
p {
|
||||
color: #333;
|
||||
color: #e0e0e0;
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
a {
|
||||
color: #00796b;
|
||||
color: #00bfae;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
a:hover {
|
||||
color: #004d40;
|
||||
color: #00e6d0;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.icon {
|
||||
font-size: 3.5rem;
|
||||
margin-bottom: 0.7rem;
|
||||
color: #00796b;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.container {
|
||||
padding: 1.2rem 0.5rem;
|
||||
@@ -62,19 +59,20 @@ MAINTENANCE_MESSAGE = """
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class=\"container\">
|
||||
<div class=\"icon\">🔧</div>
|
||||
<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>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>
|
||||
"""
|
||||
|
||||
@app.route("/")
|
||||
def maintenance():
|
||||
return render_template_string(MAINTENANCE_MESSAGE)
|
||||
# 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)
|
||||
|
||||
Reference in New Issue
Block a user