Reorganize error template structure to consolidate shared templates in a dedicated location. Changes: - Move templates/fallback/* to templates/shared/ with -fallback suffix - 404.html → 404-fallback.html - 500.html → 500-fallback.html - generic.html → generic-fallback.html - Update error_renderer.py to use new template paths - Modified template selection logic in _find_template() - Updated documentation strings to reflect new paths - Update error rendering documentation - HTML_ERROR_RENDERING_FLOW_DIAGRAM.md: Updated diagrams and examples - ERROR_RENDERING_DEVELOPER_DOCUMENTATION.md: Updated file structure and paths Benefits: - Clearer organization with all shared templates in shared/ directory - Consistent naming convention (-fallback suffix) indicates purpose - Aligns with existing cdn-fallback.html in same directory 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
79 lines
2.2 KiB
HTML
79 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ status_code }} - Error</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
}
|
|
.container {
|
|
text-align: center;
|
|
padding: 2rem;
|
|
max-width: 600px;
|
|
}
|
|
h1 {
|
|
font-size: 8rem;
|
|
font-weight: 700;
|
|
margin-bottom: 1rem;
|
|
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
|
|
}
|
|
h2 {
|
|
font-size: 2rem;
|
|
font-weight: 400;
|
|
margin-bottom: 1rem;
|
|
}
|
|
p {
|
|
font-size: 1.2rem;
|
|
margin-bottom: 2rem;
|
|
opacity: 0.9;
|
|
}
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 1rem 2.5rem;
|
|
background: white;
|
|
color: #667eea;
|
|
text-decoration: none;
|
|
border-radius: 50px;
|
|
font-weight: 600;
|
|
transition: all 0.3s ease;
|
|
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
|
|
margin: 0 0.5rem;
|
|
}
|
|
.btn:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
|
|
}
|
|
.error-code {
|
|
margin-top: 2rem;
|
|
font-size: 0.9rem;
|
|
opacity: 0.7;
|
|
font-family: 'Courier New', monospace;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>{{ status_code }}</h1>
|
|
<h2>{{ status_name }}</h2>
|
|
<p>{{ message }}</p>
|
|
<div>
|
|
<a href="/" class="btn">Go Home</a>
|
|
<a href="javascript:history.back()" class="btn">Go Back</a>
|
|
</div>
|
|
<div class="error-code">Error Code: {{ error_code }}</div>
|
|
</div>
|
|
</body>
|
|
</html> |