fix: 修复登录重定向失效 + 404页面友好化
- ShowPage 未登录用户看未发布帖子时引导登录(携带 redirect 参数),替代直接 404 - login.js 无 redirect 参数时回退到同站 Referer 页面 - 404 页面重设计:SVG 图标 + 中文提示 + 返回首页和浏览帖子双按钮 - posts.css 新增 404 页面按钮样式
This commit is contained in:
@ -200,19 +200,67 @@
|
||||
/* ========== 404 ========== */
|
||||
.error-404 {
|
||||
text-align: center;
|
||||
padding: 80px 0;
|
||||
padding: 100px 0;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.error-404-icon {
|
||||
color: #d1d5db;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.error-404-icon svg {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
}
|
||||
|
||||
.error-404 h1 {
|
||||
font-size: 72px;
|
||||
color: #d1d5db;
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
color: #374151;
|
||||
margin: 0 0 8px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.error-404 p {
|
||||
font-size: 18px;
|
||||
color: #6b7280;
|
||||
margin: 12px 0 24px;
|
||||
font-size: 15px;
|
||||
color: #9ca3af;
|
||||
margin: 0 0 32px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.error-404-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.error-404-actions .btn {
|
||||
padding: 10px 24px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.error-404-actions .btn-primary {
|
||||
background: #2563eb;
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.error-404-actions .btn-primary:hover {
|
||||
background: #1d4ed8;
|
||||
}
|
||||
|
||||
.error-404-actions .btn-secondary {
|
||||
background: #f3f4f6;
|
||||
color: #374151;
|
||||
border: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.error-404-actions .btn-secondary:hover {
|
||||
background: #e5e7eb;
|
||||
}
|
||||
|
||||
/* ========== 空状态 ========== */
|
||||
|
||||
Reference in New Issue
Block a user