feat: 添加数字人页面,包含8个写实风格人物卡片
- 新建 digital-humans 页面,展示8个数字人角色 - 使用public/human目录下的写实美女图片 - 卡片采用左图右文布局,4列响应式设计 - 图片上添加左下角遮罩显示姓名 - 首页添加数字人应用入口区域 - 调整卡片间距和样式优化
This commit is contained in:
+48
-3
@@ -1,4 +1,4 @@
|
||||
import { prisma } from "@//app/lib/prisma"
|
||||
import { prisma } from "@/app/lib/prisma"
|
||||
import Link from "next/link"
|
||||
import Image from "next/image"
|
||||
|
||||
@@ -15,8 +15,7 @@ export default async function HomePage() {
|
||||
})
|
||||
|
||||
const categories = await prisma.category.findMany({
|
||||
include: { _count: { select: { agents: true } },
|
||||
},
|
||||
include: { _count: { select: { agents: true } } },
|
||||
})
|
||||
|
||||
return (
|
||||
@@ -151,6 +150,52 @@ export default async function HomePage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 数字人应用 */}
|
||||
<section className="py-16 bg-gradient-to-br from-purple-50 to-pink-50">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
<div className="text-center mb-10">
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-2">数字人应用</h2>
|
||||
<p className="text-gray-500">探索虚拟数字人角色,体验沉浸式智能交互</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5">
|
||||
{[
|
||||
{ name: "小雅", avatar: "👩💼", category: "商务助手", color: "from-purple-500 to-pink-500" },
|
||||
{ name: "书淇", avatar: "👩🎓", category: "教育导师", color: "from-blue-500 to-cyan-500" },
|
||||
{ name: "樱桃", avatar: "👧", category: "生活陪伴", color: "from-pink-500 to-rose-500" },
|
||||
].map((human) => (
|
||||
<Link
|
||||
key={human.name}
|
||||
href="/digital-humans"
|
||||
className="bg-white rounded-2xl border border-gray-200 p-5 hover:border-purple-300 shadow-sm hover:shadow-md transition-all duration-300"
|
||||
>
|
||||
<div className="flex items-center gap-4 mb-4">
|
||||
<div className={`w-14 h-14 bg-gradient-to-br ${human.color} rounded-xl flex items-center justify-center text-3xl flex-shrink-0`}>
|
||||
{human.avatar}
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<h3 className="font-semibold text-gray-900 truncate">{human.name}</h3>
|
||||
<span className="inline-block mt-1 px-2 py-0.5 rounded-full text-xs font-medium bg-purple-50 text-purple-600">
|
||||
{human.category}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-gray-500 text-sm leading-relaxed mb-4">
|
||||
点击查看数字人详情,开启智能交互体验
|
||||
</p>
|
||||
<div className="flex items-center justify-end">
|
||||
<span className="text-purple-600 font-medium hover:underline transition-colors">查看数字人库 →</span>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
<div className="text-center mt-10">
|
||||
<Link href="/digital-humans" className="inline-block bg-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:bg-purple-700 transition">
|
||||
查看全部数字人 →
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 智能分类与使用场景 */}
|
||||
<section id="features" className="py-16 bg-white rounded-3xl shadow-xl -mt-10 relative z-20">
|
||||
<div className="max-w-6xl mx-auto px-6">
|
||||
|
||||
Reference in New Issue
Block a user