Files
blog/themes/Ying/layouts/404.html
T
2026-03-01 13:10:44 +08:00

131 lines
3.3 KiB
HTML

{{ define "main" }}
<div id="pjax-container">
<div class="error-container">
<div class="error-content">
<div class="error-code">404</div>
<h1 class="error-title">页面未找到</h1>
<p class="error-desc">抱歉,你访问的页面似乎已经去流浪了...</p>
<div class="error-actions">
<a href="{{ .Site.BaseURL }}" class="error-btn primary">
<i class="ri-home-4-line"></i> 返回首页
</a>
</div>
</div>
</div>
<style>
.error-container {
min-height: 60vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 20px;
animation: fadeIn 0.8s ease-out;
}
.error-content {
max-width: 600px;
width: 100%;
}
.error-code {
font-size: 120px;
font-weight: 900;
line-height: 1;
background: linear-gradient(135deg, var(--link-color-light), var(--sanji-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 20px;
text-shadow: 4px 4px 0px rgba(0,0,0,0.05);
font-family: 'Georgia', serif;
}
[data-theme="dark"] .error-code {
background: linear-gradient(135deg, var(--link-color-dark), var(--sanji-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 4px 4px 0px rgba(255,255,255,0.05);
}
.error-title {
font-size: 24px;
font-weight: bold;
margin-bottom: 15px;
color: var(--text-title-color);
}
[data-theme="dark"] .error-title {
color: var(--text-title-dark-color);
}
.error-desc {
font-size: 16px;
color: var(--erji-color);
margin-bottom: 40px;
}
.error-actions {
display: flex;
gap: 20px;
justify-content: center;
flex-wrap: wrap;
}
.error-btn {
padding: 12px 30px;
border-radius: 50px;
text-decoration: none;
font-size: 16px;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 8px;
border: 1px solid transparent;
box-sizing: border-box;
}
.error-btn.primary {
background-color: var(--text-title-color);
color: #fff;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
[data-theme="dark"] .error-btn.primary {
background-color: var(--text-title-dark-color);
color: #000;
box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}
.error-btn.primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
.error-code {
font-size: 80px;
}
.error-actions {
flex-direction: column;
gap: 15px;
width: 100%;
padding: 0 20px;
box-sizing: border-box;
}
.error-btn {
width: 100%;
max-width: 100%;
justify-content: center;
}
}
</style>
</div>
{{ end }}