Skip to content

Instantly share code, notes, and snippets.

@azer
Created October 27, 2024 07:40
Show Gist options
  • Save azer/6aa856adee626fde17b49798d1b09b3d to your computer and use it in GitHub Desktop.
Save azer/6aa856adee626fde17b49798d1b09b3d to your computer and use it in GitHub Desktop.
50x.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Server Error</title>
<style>
:root {
--primary-color: #dc2626;
--text-primary: #1f2937;
--text-secondary: #4b5563;
--bg-color: #f3f4f6;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
background-color: var(--bg-color);
color: var(--text-primary);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.container {
max-width: 600px;
width: 100%;
background: white;
padding: 2.5rem;
border-radius: 12px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
text-align: center;
}
.error-icon {
font-size: 3rem;
color: var(--primary-color);
margin-bottom: 1.5rem;
}
h1 {
font-size: 1.875rem;
color: var(--text-primary);
margin-bottom: 1rem;
}
p {
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
.status {
color: var(--text-secondary);
font-size: 0.875rem;
margin-bottom: 1.5rem;
}
.btn {
display: inline-block;
background-color: var(--primary-color);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 6px;
text-decoration: none;
font-weight: 500;
transition: background-color 0.2s;
}
.btn:hover {
background-color: #b91c1c;
}
.btn:active {
background-color: #991b1b;
}
.reload-text {
font-size: 0.875rem;
color: var(--text-secondary);
margin-top: 1rem;
}
@media (max-width: 640px) {
.container {
padding: 2rem;
}
h1 {
font-size: 1.5rem;
}
}
</style>
</head>
<body>
<div class="container">
<div class="error-icon">⚠️</div>
<h1>Server Error</h1>
<p>Sorry, something went wrong on our end.</p>
<p class="status">Status Code: 5XX</p>
<a href="/" class="btn">Return Home</a>
<p class="reload-text">You can also try reloading the page.</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment