You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iTi-Flask/iti/templates/errors/404.html

313 lines
8.8 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 - 页面未找到</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
:root {
--primary-color: #4ade80;
--background-color: #ffffff;
--text-color: #1f2937;
--transition-speed: 0.3s;
}
[data-theme="dark"] {
--primary-color: #34d399;
--background-color: #111827;
--text-color: #f3f4f6;
--card-background: #1f2937;
--card-shadow: rgba(0, 0, 0, 0.3);
--button-background: #34d399;
--button-text: #111827;
--button-hover: #2dd4bf;
--button-active: #22c55e;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: var(--background-color);
color: var(--text-color);
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: background-color var(--transition-speed), color var(--transition-speed);
position: relative;
overflow: hidden;
padding: 2rem;
padding-top: 5rem; /* 避免被固定 header 覆盖 */
text-align: center;
}
/* 背景动画元素 */
.background-animation {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
.particle {
position: absolute;
border-radius: 50%;
background-color: var(--primary-color);
opacity: 0.1;
animation: float 20s infinite ease-in-out;
}
/* 品牌水印 */
.logo-watermark {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(2);
opacity: 0.03;
z-index: -1;
width: 200px;
height: 200px;
transition: opacity var(--transition-speed);
}
.logo-watermark::before {
content: "iTi";
font-size: 4rem;
font-weight: 700;
color: var(--primary-color);
}
/* 错误内容容器 */
.error-container {
max-width: 600px;
width: 100%;
transform: translateY(20px);
opacity: 0;
animation: fadeIn 0.8s ease forwards;
margin-bottom: auto;
}
/* 错误代码 */
.error-code {
font-size: 8rem;
font-weight: 700;
color: var(--primary-color);
margin-bottom: 1rem;
position: relative;
display: inline-block;
animation: pulse 2s infinite ease-in-out;
text-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
}
/* 错误标题 */
.error-title {
font-size: 2rem;
font-weight: 600;
margin-bottom: 1rem;
color: var(--text-color);
}
/* 错误描述 */
.error-description {
font-size: 1.1rem;
line-height: 1.8;
margin-bottom: 2rem;
color: var(--text-color);
opacity: 0.9;
max-width: 500px;
margin-left: auto;
margin-right: auto;
}
/* 版权信息区域 */
.footer {
margin-top: auto;
padding: 1.5rem;
width: 100%;
border-top: 1px solid rgba(0, 0, 0, 0.1);
font-size: 0.9rem;
color: var(--text-color);
opacity: 0.7;
transition: all var(--transition-speed);
}
[data-theme="dark"] .footer {
border-top-color: rgba(255, 255, 255, 0.1);
}
/* 主题切换按钮 */
.theme-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background-color: rgba(255, 255, 255, 0.8);
border: none;
border-radius: 50%;
width: 2.5rem;
height: 2.5rem;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
z-index: 100;
backdrop-filter: blur(10px);
}
[data-theme="dark"] .theme-toggle {
background-color: rgba(17, 24, 39, 0.8);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.theme-toggle:hover {
transform: scale(1.1);
}
.theme-toggle i {
color: var(--text-color);
font-size: 1.2rem;
}
/* 动画效果 */
@keyframes fadeIn {
to {
transform: translateY(0);
opacity: 1;
}
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.05);
opacity: 0.9;
}
}
@keyframes float {
0%, 100% {
transform: translateY(0) translateX(0);
}
25% {
transform: translateY(-20px) translateX(20px);
}
50% {
transform: translateY(-40px) translateX(0);
}
75% {
transform: translateY(-20px) translateX(-20px);
}
}
/* 响应式调整 */
@media (max-width: 768px) {
.error-code {
font-size: 6rem;
}
.error-title {
font-size: 1.8rem;
}
}
@media (max-width: 480px) {
.error-code {
font-size: 4.5rem;
}
.error-title {
font-size: 1.5rem;
}
.error-description {
font-size: 1rem;
}
.footer {
font-size: 0.8rem;
}
}
</style>
</head>
<body>
{% include 'errors/header.html' %}
<!-- 背景动画 -->
<div class="background-animation" id="backgroundAnimation"></div>
<!-- Logo水印 -->
<div class="logo-watermark"></div>
<!-- 错误内容容器 -->
<div class="error-container">
<div class="error-code">404</div>
<h1 class="error-title">页面未找到</h1>
<p class="error-description">
抱歉,您访问的页面不存在或已被移除。
可能的原因包括URL输入错误、页面已删除或移动到其他位置。
</p>
</div>
<!-- 页脚区域 -->
{% include 'errors/footer.html' %}
<script>
// 创建背景动画粒子
function createBackgroundParticles() {
const container = document.getElementById('backgroundAnimation');
const particleCount = 20;
// 清除现有粒子
container.innerHTML = '';
// 创建新粒子
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
// 随机大小
const size = Math.random() * 100 + 50;
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
// 随机位置
particle.style.left = `${Math.random() * 100}%`;
particle.style.top = `${Math.random() * 100}%`;
// 随机动画延迟
particle.style.animationDelay = `${Math.random() * 20}s`;
// 随机动画持续时间
particle.style.animationDuration = `${Math.random() * 20 + 20}s`;
container.appendChild(particle);
}
}
// 页面加载完成后执行
window.addEventListener('DOMContentLoaded', () => {
document.body.classList.add('loaded');
createBackgroundParticles();
});
// 窗口大小改变时重新创建粒子
window.addEventListener('resize', () => {
createBackgroundParticles();
});
</script>
</body>
</html>