refactor: 完成静态网站转换,移除所有 CMS 和动态功能

- 删除数据库相关代码 (src/db/)
- 删除 API 路由 (src/app/api/)
- 删除认证相关代码 (src/lib/auth/, src/providers/)
- 删除监控和安全中间件 (src/lib/security/, src/lib/monitoring/)
- 删除 hooks (use-news, use-products, use-services)
- 更新组件为静态数据源
- 添加 nginx 静态配置和部署脚本
- 添加 static-link 组件
This commit is contained in:
张翔
2026-04-21 07:53:56 +08:00
parent cd1d6aa28a
commit 6403489954
197 changed files with 654 additions and 24762 deletions
+10 -10
View File
@@ -1,7 +1,7 @@
'use client';
import { useEffect } from 'react';
import Link from 'next/link';
import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { Home, RefreshCw, AlertTriangle } from 'lucide-react';
@@ -24,7 +24,7 @@ export default function Error({
<div className="w-24 h-24 bg-[#C41E3A]/10 rounded-full flex items-center justify-center mx-auto mb-6">
<AlertTriangle className="w-12 h-12 text-[#C41E3A]" />
</div>
<div className="w-32 h-1 bg-[#C41E3A] mx-auto"></div>
<div className="w-32 h-1 bg-[#C41E3A] mx-auto" />
</div>
<h1 className="text-3xl font-bold text-[#1C1C1C] mb-4">
@@ -64,10 +64,10 @@ export default function Error({
variant="outline"
asChild
>
<Link href="/">
<StaticLink href="/">
<Home className="w-5 h-5 mr-2" />
</Link>
</StaticLink>
</Button>
</div>
@@ -77,7 +77,7 @@ export default function Error({
</h3>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<Link
<StaticLink
href="/contact"
className="flex items-center p-4 bg-white rounded-lg hover:shadow-md transition-shadow group"
>
@@ -88,9 +88,9 @@ export default function Error({
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="text-sm text-[#5C5C5C]"></div>
</div>
</Link>
</StaticLink>
<Link
<StaticLink
href="/services"
className="flex items-center p-4 bg-white rounded-lg hover:shadow-md transition-shadow group"
>
@@ -101,15 +101,15 @@ export default function Error({
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="text-sm text-[#5C5C5C]"></div>
</div>
</Link>
</StaticLink>
</div>
</div>
<div className="mt-8 text-sm text-[#5C5C5C]">
{' '}
<Link href="/contact" className="text-[#C41E3A] hover:underline">
<StaticLink href="/contact" className="text-[#C41E3A] hover:underline">
</Link>
</StaticLink>
</div>
</div>
</div>