70 lines
1.9 KiB
HTML
70 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{if .Title}}{{.Title}}{{else}}错误{{end}}</title>
|
|
<style>
|
|
body {
|
|
font-family: system-ui, sans-serif;
|
|
background-color: #f5f7fa;
|
|
color: #334155;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100vh;
|
|
margin: 0;
|
|
padding: 20px;
|
|
}
|
|
.error-container {
|
|
background-color: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
padding: 30px;
|
|
max-width: 500px;
|
|
text-align: center;
|
|
}
|
|
.error-code {
|
|
font-size: 48px;
|
|
font-weight: bold;
|
|
color: #475569;
|
|
margin-bottom: 10px;
|
|
}
|
|
.error-message {
|
|
margin-bottom: 24px;
|
|
color: #64748b;
|
|
}
|
|
.error-action {
|
|
margin-top: 16px;
|
|
}
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 10px 20px;
|
|
background-color: #3b82f6;
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 6px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
.btn:hover {
|
|
background-color: #2563eb;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="error-container">
|
|
<div class="error-code">{{.StatusCode}}</div>
|
|
<div class="error-message">
|
|
{{if .ErrorMessage}}
|
|
{{.ErrorMessage}}
|
|
{{else}}
|
|
很抱歉,服务器发生了错误。
|
|
{{end}}
|
|
</div>
|
|
<div class="error-action">
|
|
<a href="/" class="btn">返回首页</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|