Files
zbiorki_app/zbiorka_app/templates/error.html
Mateusz Gruszczyński be8d4b5a27 error handling
2026-03-20 10:59:51 +01:00

116 lines
3.0 KiB
HTML

<!doctype html>
<html lang="pl">
<head>
<meta charset="utf-8">
<title>{{ error_code }} {{ error_name }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if asset_url is defined %}
<link rel="stylesheet" href="{{ asset_url('css/style.css') }}">
{% else %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
{% endif %}
<style>
body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--text);
font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}
.error-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem 1rem;
}
.error-box {
width: 100%;
max-width: 720px;
text-align: center;
padding: 2.5rem 2rem;
border-radius: var(--radius);
background: var(--surface-1);
border: 1px solid var(--border);
box-shadow: var(--shadow-md);
}
.error-code {
font-size: 3rem;
font-weight: 700;
margin-bottom: .25rem;
color: var(--accent);
}
.error-name {
font-size: 1.6rem;
margin-bottom: .5rem;
color: var(--text);
}
.error-message {
margin-bottom: 1.5rem;
color: var(--text-muted);
line-height: 1.5;
}
.error-actions a {
display: inline-block;
padding: .6rem 1.3rem;
border-radius: 8px;
font-weight: 700;
background-color: var(--accent);
border: 1px solid var(--accent-600);
color: #111;
transition: transform 120ms ease, background-color var(--trans), border-color var(--trans);
}
.error-actions a:hover {
background-color: var(--accent-600);
border-color: var(--accent-700);
color: #111;
transform: translateY(-1px);
}
.error-actions a:active {
background-color: var(--accent-700);
border-color: var(--accent-700);
transform: translateY(0);
}
@media (max-width: 576px) {
.error-box {
padding: 2rem 1.25rem;
}
.error-code {
font-size: 2.4rem;
}
.error-name {
font-size: 1.3rem;
}
}
</style>
</head>
<body>
<main class="error-page">
<section class="error-box">
<div class="error-code">{{ error_code }}</div>
<h1 class="error-name">{{ error_name }}</h1>
<p class="error-message">{{ error_message }}</p>
<div class="error-actions">
<a href="/">Powrot na strone glowna</a>
</div>
</section>
</main>
</body>
</html>