handling errors

This commit is contained in:
Kulvir Singh
2025-10-15 02:35:39 +05:30
parent 6e877b5e85
commit 9d3b3b7940
2 changed files with 98 additions and 0 deletions

91
caddy/error.html Normal file
View File

@@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Caddy Error</title>
<link rel="icon" href="data:,">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: #1a1a1a;
color: #e5e5e5;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 2rem;
}
.container {
max-width: 600px;
text-align: center;
}
.error-code {
font-size: 8rem;
font-weight: 700;
line-height: 1;
color: #ff6b35;
margin-bottom: 1rem;
letter-spacing: -0.02em;
}
h1 {
font-size: 2rem;
font-weight: 600;
margin-bottom: 1rem;
color: #ffffff;
}
p {
font-size: 1.125rem;
line-height: 1.6;
color: #a0a0a0;
margin-bottom: 2rem;
}
.button {
display: inline-block;
padding: 0.875rem 2rem;
background-color: #ff6b35;
color: #ffffff;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
transition: background-color 0.2s;
}
.button:hover {
background-color: #e55a28;
}
@media (max-width: 640px) {
.error-code {
font-size: 5rem;
}
h1 {
font-size: 1.5rem;
}
p {
font-size: 1rem;
}
}
</style>
</head>
<body>
<div class="container">
<div class="error-code">{{ph "http.error.status_code"}}</div>
<h1>{{ph "http.error.text"}}</h1>
<a href="/" class="button">Go Home</a>
</div>
</body>
</html>