mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 添加简体中文本地化配置和导航链接 - 配置本地搜索功能并设置中文翻译 - 添加 Catch-all 404 重定向中间件 - 重构侧边栏和导航结构以支持国际化 - 移除旧的英文文档内容并更新配置 - 添加页脚导航和面包屑文字本地化
133 lines
2.7 KiB
Markdown
133 lines
2.7 KiB
Markdown
---
|
|
layout: page
|
|
---
|
|
|
|
<script setup>
|
|
import { ref, onMounted, onUnmounted } from 'vue'
|
|
|
|
const countdown = ref(5)
|
|
let timer = null
|
|
|
|
onMounted(() => {
|
|
timer = setInterval(() => {
|
|
countdown.value--
|
|
if (countdown.value <= 0) {
|
|
clearInterval(timer)
|
|
window.location.href = '/GFramework/zh-CN/'
|
|
}
|
|
}, 1000)
|
|
})
|
|
|
|
onUnmounted(() => {
|
|
if (timer) {
|
|
clearInterval(timer)
|
|
}
|
|
})
|
|
|
|
const goHome = () => {
|
|
if (timer) {
|
|
clearInterval(timer)
|
|
}
|
|
window.location.href = '/GFramework/zh-CN/'
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.not-found-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 60vh;
|
|
text-align: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.error-code {
|
|
font-size: 120px;
|
|
font-weight: bold;
|
|
background: linear-gradient(120deg, #3451b2 0%, #6366f1 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
margin: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
.error-title {
|
|
font-size: 32px;
|
|
margin: 20px 0 10px;
|
|
color: var(--vp-c-text-1);
|
|
}
|
|
|
|
.error-message {
|
|
font-size: 18px;
|
|
color: var(--vp-c-text-2);
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.countdown-text {
|
|
font-size: 16px;
|
|
color: var(--vp-c-text-3);
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.countdown-number {
|
|
color: #3451b2;
|
|
font-weight: bold;
|
|
font-size: 20px;
|
|
}
|
|
|
|
.action-buttons {
|
|
display: flex;
|
|
gap: 16px;
|
|
margin-top: 30px;
|
|
}
|
|
|
|
.btn {
|
|
padding: 12px 24px;
|
|
border-radius: 8px;
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
transition: all 0.3s;
|
|
cursor: pointer;
|
|
border: none;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #3451b2;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #2841a0;
|
|
transform: translateY(-2px);
|
|
}
|
|
</style>
|
|
|
|
<div class="not-found-container">
|
|
<h1 class="error-code">404</h1>
|
|
<h2 class="error-title">Page Not Found / 页面未找到</h2>
|
|
<p class="error-message">The page you are looking for does not exist.<br>您访问的页面不存在。</p>
|
|
|
|
<p class="countdown-text">
|
|
Auto redirecting in <span class="countdown-number">{{ countdown }}</span> seconds<br>
|
|
<span class="countdown-number">{{ countdown }}</span> 秒后自动跳转
|
|
</p>
|
|
<div class="suggestions">
|
|
<h3>📚 您可能想访问:</h3>
|
|
<ul>
|
|
<li>→ <a href="/GFramework/zh-CN/getting-started/installation">安装配置</a></li>
|
|
<li>→ <a href="/GFramework/zh-CN/getting-started/quick-start">快速开始</a></li>
|
|
<li>→ <a href="/GFramework/zh-CN/core/overview">Core 核心框架</a></li>
|
|
<li>→ <a href="/GFramework/zh-CN/tutorials/basic-tutorial">基础教程</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="action-buttons">
|
|
<button class="btn btn-primary" @click="goHome">
|
|
Go to Homepage / 返回首页
|
|
</button>
|
|
</div>
|
|
</div>
|
|
``` |