feat: 统一全站设计风格、导航组件与文案逻辑自洽性修复

- 新增 InkGlowCard 墨韵流光卡片组件,统一全站卡片交互风格
- 新增 PageNav 面包屑组件,统一全站页面导航
- 统一色彩体系、排版层级、间距节奏和动画风格
- 修复 CTA 区品牌名称错误(诺瓦隆→睿新致遠)
- 修复 ERP 产品卖点与年费制定价矛盾
- 导航下拉补充 SDS 和 OA 产品
- 统一全站数据指标为 12+年核心团队经验、6自研产品、10+团队成员
- 移除不可靠的 100%客户满意度和 30+行业专家指标
- 修复新闻时间线不合理问题,调整里程碑节奏
- 统一响应承诺为工作日快速响应
- 服务第4项重命名为行业方案实施,厘清概念
- 服务详情页效果数据改为定性描述
- 删除 cases 模块,精简代码库
This commit is contained in:
张翔
2026-05-02 08:11:47 +08:00
parent 307e0a654e
commit a272e58aaa
64 changed files with 1934 additions and 2995 deletions
+187 -225
View File
@@ -1,267 +1,229 @@
'use client';
import { motion } from 'framer-motion';
import { useInView } from 'framer-motion';
import { useRef, useState, useEffect, useMemo } from 'react';
import { useState, useEffect, useMemo } from 'react';
import { COMPANY_INFO, STATS } from '@/lib/constants';
import { Card, CardContent } from '@/components/ui/card';
import { PageHeader } from '@/components/ui/page-header';
import { FlipClock } from '@/components/ui/flip-clock';
import { Lightbulb, Users, Target, Award, MapPin, Mail } from 'lucide-react';
import { PageNav } from '@/components/layout/page-nav';
import { Users, Target, Award, MapPin, Mail } from 'lucide-react';
import { differenceInYears, differenceInMonths, differenceInDays, subYears, subMonths } from 'date-fns';
export function AboutClient() {
const contentRef = useRef(null);
const isContentInView = useInView(contentRef, { once: true, margin: '-100px' });
const [operationTime, setOperationTime] = useState({ days: 0, months: 0, years: 0 });
useEffect(() => {
const foundingDate = new Date('2026-01-15');
const calculateTime = () => {
const now = new Date();
const diff = now.getTime() - foundingDate.getTime();
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const years = Math.floor(days / 365);
const months = Math.floor((days % 365) / 30);
const years = differenceInYears(now, foundingDate);
const afterYears = subYears(now, years);
const months = differenceInMonths(afterYears, foundingDate);
const afterMonths = subMonths(afterYears, months);
const days = differenceInDays(afterMonths, foundingDate);
setOperationTime({ days, months, years });
};
calculateTime();
const timer = setInterval(calculateTime, 60000);
return () => clearInterval(timer);
}, []);
const values = useMemo(() => [
{
icon: Lightbulb,
title: '创新驱动',
description: '持续探索前沿技术,以创新思维解决业务挑战,为客户创造差异化价值',
},
{
icon: Users,
title: '客户至上',
description: '深入理解客户需求,提供个性化解决方案,建立长期合作伙伴关系',
},
{
icon: Target,
title: '追求卓越',
description: '以最高标准要求自己,持续优化产品和服务质量,超越客户期望',
},
{
icon: Award,
title: '诚信为本',
description: '坚持透明沟通,信守承诺,以诚信赢得客户信任和尊重',
},
{ icon: Target, title: '务实', description: '不追逐风口,只做真正为客户创造价值的事。' },
{ icon: Users, title: '陪伴', description: '交付只是开始,长期陪跑才是我们的承诺。' },
{ icon: Award, title: '专业', description: '用扎实的工程能力和行业经验赢得信任。' },
], []);
const milestones = useMemo(() => [
{
date: '2026年1月',
title: '公司成立',
description: '四川睿新致远科技有限公司在成都龙泉驿区正式成立,专注于企业数字化转型解决方案',
},
{
date: '2026年1月',
title: '团队组建',
description: '核心团队到位,技术团队拥有丰富的行业经验和专业技能',
},
{
date: '2026年2月',
title: '业务启动',
description: '推出企业数字化转型解决方案,开始服务首批客户',
},
{
date: '2026年2月',
title: '产品发布',
description: '自主研发的ERP、CRM等产品陆续上线,为客户提供一站式数字化服务',
},
{ date: '2026年1月', title: '公司成立', description: '四川睿新致远科技有限公司在成都龙泉驿区正式成立' },
{ date: '2026年1月', title: '团队组建', description: '核心团队到位,成员来自多个大型传统IT企业,具备扎实的工程能力和规范化交付经验' },
{ date: '2026年2月', title: '业务启动', description: '推出企业数字化转型解决方案,开始服务首批客户' },
{ date: '2026年3月', title: '产品研发', description: '自主研发的ERP、CRM等产品启动研发,逐步构建产品矩阵' },
{ date: '2026年5月', title: '产品上线', description: '首批产品完成开发并上线试运行,形成覆盖企业管理核心场景的产品体系' },
], []);
return (
<div className="min-h-screen bg-white">
<PageHeader
title="关于我们"
description="了解睿新致远的品牌故事。我们不只是技术供应商,更是您数字化转型的成长伙伴。以智慧连接数字趋势,以伙伴身份陪您成长。"
/>
<div ref={contentRef} className="container-wide py-12 md:py-16">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6 }}
className="max-w-4xl mx-auto space-y-8"
>
<div className="bg-[#FFFBF5] rounded-2xl p-8 border border-[#E5E5E5]">
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6"></h2>
<p className="text-[#5C5C5C] mb-6 leading-relaxed">
</p>
<div className="mb-6">
<h3 className="text-xl font-semibold text-[#1C1C1C] mb-3"></h3>
<p className="text-[#5C5C5C] mb-3 leading-relaxed">
</p>
<p className="text-[#5C5C5C] mb-3 leading-relaxed">
</p>
<p className="text-[#5C5C5C] leading-relaxed">
</p>
</div>
<div>
<h3 className="text-xl font-semibold text-[#1C1C1C] mb-3"></h3>
<p className="text-[#5C5C5C] mb-3 leading-relaxed">
&ldquo;&rdquo;
</p>
<p className="text-[#5C5C5C] mb-3 leading-relaxed">
</p>
<p className="text-[#5C5C5C] leading-relaxed">
</p>
<p className="text-[#5C5C5C] mt-3 leading-relaxed">
&ldquo;&rdquo;
</p>
</div>
</div>
<div className="bg-[#FFFBF5] rounded-2xl p-8 border border-[#E5E5E5]">
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6"></h2>
<p className="text-[#5C5C5C] mb-6 leading-relaxed">
</p>
<ul className="space-y-3 mb-6">
<li className="flex items-start gap-3">
<span className="text-green-600 font-bold"></span>
<span className="text-[#5C5C5C]"></span>
</li>
<li className="flex items-start gap-3">
<span className="text-green-600 font-bold"></span>
<span className="text-[#5C5C5C]"></span>
</li>
<li className="flex items-start gap-3">
<span className="text-green-600 font-bold"></span>
<span className="text-[#5C5C5C]">&ldquo;&rdquo;</span>
</li>
</ul>
<p className="text-[#5C5C5C] leading-relaxed font-medium">
</p>
</div>
<FlipClock
years={operationTime.years}
months={operationTime.months}
days={operationTime.days}
/>
<section className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '关于我们' }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.2 }}
className="grid grid-cols-2 md:grid-cols-4 gap-6"
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
className="max-w-3xl"
>
{STATS.map((stat, idx) => (
<Card key={idx} className="text-center border-[#E5E5E5]">
<CardContent className="pt-6">
<div className="text-3xl sm:text-4xl font-bold text-[#C41E3A] mb-2">{stat.value}</div>
<div className="text-sm text-[#5C5C5C]">{stat.label}</div>
</CardContent>
</Card>
))}
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">About</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
</h1>
<p className="text-lg text-[#595959] leading-relaxed">
</p>
</motion.div>
</div>
</section>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.3 }}
className="mb-16"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
{values.map((value, idx) => (
<motion.div
key={value.title}
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.5, delay: 0.4 + idx * 0.1 }}
className="flex items-start gap-4 p-6 bg-[#FFFBF5] rounded-xl border border-[#E5E5E5] hover:border-[#1C1C1C] transition-all duration-300"
>
<div className="w-12 h-12 rounded-lg bg-[#C41E3A] flex items-center justify-center shrink-0">
<value.icon className="w-6 h-6 text-white" />
<section className="pb-16">
<div className="container-wide">
<div className="max-w-4xl mx-auto space-y-8">
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="p-8 rounded-xl border border-[#E5E5E5]"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6"> </h2>
<p className="text-xl font-semibold text-[#1C1C1C] mb-4"></p>
<p className="text-[#595959] mb-6 leading-relaxed"></p>
<div className="mb-6">
<h3 className="text-lg font-semibold text-[#1C1C1C] mb-3"></h3>
<p className="text-[#595959] mb-2 leading-relaxed"></p>
<p className="text-[#595959] mb-2 leading-relaxed"></p>
<p className="text-[#595959] leading-relaxed"></p>
</div>
<div>
<h3 className="text-lg font-semibold text-[#1C1C1C] mb-3"></h3>
<p className="text-[#595959] mb-2 leading-relaxed">"项目交付"</p>
<p className="text-[#595959] mb-2 leading-relaxed"></p>
<p className="text-[#595959] mb-2 leading-relaxed"></p>
<p className="text-[#595959] mt-3 leading-relaxed">"项目是否按时交付"</p>
</div>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: 0.1 }}
className="p-8 rounded-xl border border-[#E5E5E5]"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6"></h2>
<p className="text-[#595959] mb-4 leading-relaxed"></p>
<ul className="space-y-2 mb-6">
<li className="flex items-start gap-3">
<span className="text-[#C41E3A] font-bold"></span>
<span className="text-[#595959]"></span>
</li>
<li className="flex items-start gap-3">
<span className="text-[#C41E3A] font-bold"></span>
<span className="text-[#595959]"></span>
</li>
<li className="flex items-start gap-3">
<span className="text-[#C41E3A] font-bold"></span>
<span className="text-[#595959]">"一锤子买卖"</span>
</li>
</ul>
<p className="text-[#1C1C1C] leading-relaxed font-medium">
</p>
</motion.div>
<FlipClock
years={operationTime.years}
months={operationTime.months}
days={operationTime.days}
/>
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="grid grid-cols-2 md:grid-cols-4 gap-4"
>
{STATS.map((stat, idx) => (
<div key={idx} className="p-6 bg-[#F5F5F5] rounded-lg text-center">
<div className="text-3xl font-bold text-[#C41E3A] mb-1">{stat.value}</div>
<div className="text-sm text-[#595959]">{stat.label}</div>
</div>
))}
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
{values.map((value) => (
<div
key={value.title}
className="flex items-start gap-4 p-6 rounded-xl border border-[#E5E5E5] hover:border-[#C41E3A]/30 transition-colors"
>
<div className="w-10 h-10 rounded-lg bg-[#FEF2F4] flex items-center justify-center shrink-0">
<value.icon className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<h3 className="font-semibold text-[#1C1C1C] mb-1">{value.title}</h3>
<p className="text-sm text-[#595959]">{value.description}</p>
</div>
</div>
))}
</div>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="space-y-4">
{milestones.map((milestone) => (
<div
key={milestone.title}
className="flex flex-col md:flex-row md:items-start gap-3 p-5 rounded-lg border border-[#E5E5E5]"
>
<div className="md:w-28 shrink-0">
<span className="text-sm font-medium text-[#C41E3A]">{milestone.date}</span>
</div>
<div className="flex-1">
<h3 className="font-semibold text-[#1C1C1C] mb-1 text-sm">{milestone.title}</h3>
<p className="text-sm text-[#595959]">{milestone.description}</p>
</div>
</div>
))}
</div>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="p-8 rounded-xl border border-[#E5E5E5]"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div className="flex items-center gap-3">
<div className="w-10 h-10 bg-[#FEF2F4] rounded-lg flex items-center justify-center">
<MapPin className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<h3 className="font-semibold text-lg mb-2 text-[#1C1C1C]">{value.title}</h3>
<p className="text-[#5C5C5C] text-sm">{value.description}</p>
<p className="text-xs text-[#595959]"></p>
<p className="text-sm font-medium text-[#1C1C1C]">{COMPANY_INFO.address}</p>
</div>
</motion.div>
))}
</div>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.5 }}
className="mb-16"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="space-y-6">
{milestones.map((milestone, idx) => (
<motion.div
key={milestone.title}
initial={{ opacity: 0, x: -20 }}
animate={isContentInView ? { opacity: 1, x: 0 } : {}}
transition={{ duration: 0.5, delay: 0.6 + idx * 0.1 }}
className="flex flex-col md:flex-row md:items-start gap-4 p-6 bg-[#FFFBF5] rounded-xl border border-[#E5E5E5]"
>
<div className="md:w-32 shrink-0">
<span className="text-sm font-medium text-[#C41E3A]">{milestone.date}</span>
</div>
<div className="flex-1">
<h3 className="font-semibold text-[#1A1A2E] mb-1">{milestone.title}</h3>
<p className="text-[#718096] text-sm">{milestone.description}</p>
</div>
</motion.div>
))}
</div>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.7 }}
className="bg-[#FFFBF5] rounded-2xl p-8 border border-[#E5E5E5]"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
<div className="flex items-center gap-3">
<div className="p-2 bg-white rounded-lg">
<MapPin className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<p className="text-sm text-[#5C5C5C]"></p>
<p className="text-sm font-medium text-[#1C1C1C]">{COMPANY_INFO.address}</p>
<div className="flex items-center gap-3">
<div className="w-10 h-10 bg-[#FEF2F4] rounded-lg flex items-center justify-center">
<Mail className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<p className="text-xs text-[#595959]"></p>
<p className="text-sm font-medium text-[#1C1C1C]">{COMPANY_INFO.email}</p>
</div>
</div>
</div>
<div className="flex items-center gap-3">
<div className="p-2 bg-white rounded-lg">
<Mail className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<p className="text-sm text-[#5C5C5C]"></p>
<p className="text-sm font-medium text-[#1C1C1C]">{COMPANY_INFO.email}</p>
</div>
</div>
</div>
</motion.div>
</motion.div>
</div>
</motion.div>
</div>
</div>
</section>
</div>
);
}
@@ -1,209 +0,0 @@
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import { CaseDetailClient } from './client';
interface TestCaseItem {
id: string;
title: string;
excerpt: string;
content: string;
category: string;
slug: string;
date: string;
image?: string;
challenge: string;
solution: string;
keyMoments: { title: string; description: string }[];
results: { label: string; value: string }[];
testimonial: { quote: string; author: string; role: string };
duration: string;
}
jest.mock('next/navigation', () => ({
useRouter: () => ({
push: jest.fn(),
back: jest.fn(),
forward: jest.fn(),
}),
}));
jest.mock('next/link', () => {
const MockLink = ({ children, href }: { children: React.ReactNode; href: string }) => {
return <a href={href}>{children}</a>;
};
MockLink.displayName = 'MockLink';
return MockLink;
});
const mockCaseItem: TestCaseItem = {
id: 'test-case',
title: '测试案例标题',
excerpt: '这是一个测试案例的描述',
content: '这是测试案例的详细内容',
category: '制造业',
slug: 'test-case',
date: '2026-03-27',
challenge: '这是客户面临的挑战描述',
solution: '这是我们的解决方案描述',
keyMoments: [
{ title: '关键时刻一', description: '关键时刻一的详细描述' },
{ title: '关键时刻二', description: '关键时刻二的详细描述' },
],
results: [
{ label: '运营成本', value: '降低25%' },
{ label: '设备故障响应', value: '缩短85%' },
{ label: '排产周期', value: '从1周缩至半天' },
],
testimonial: {
quote: '这是客户证言内容',
author: '测试客户',
role: 'CTO',
},
duration: '2年',
};
describe('CaseDetailClient', () => {
beforeEach(() => {
jest.clearAllMocks();
});
describe('Rendering', () => {
it('should render case detail page', () => {
const { container } = render(<CaseDetailClient caseItem={mockCaseItem} />);
expect(container.firstChild).toBeInTheDocument();
});
it('should render case title', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const title = screen.getByRole('heading', { level: 1 });
expect(title).toBeInTheDocument();
expect(title).toHaveTextContent('测试案例标题');
});
it('should render case excerpt', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const excerpts = screen.getAllByText('这是一个测试案例的描述');
expect(excerpts.length).toBeGreaterThan(0);
});
it('should render case industry badge', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const categories = screen.getAllByText('制造业');
expect(categories.length).toBeGreaterThan(0);
});
it('should render challenge content', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
expect(screen.getByText('这是客户面临的挑战描述')).toBeInTheDocument();
});
it('should render solution content', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
expect(screen.getByText('这是我们的解决方案描述')).toBeInTheDocument();
});
it('should render results data', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
expect(screen.getByText('降低25%')).toBeInTheDocument();
expect(screen.getByText('缩短85%')).toBeInTheDocument();
});
it('should render testimonial', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
expect(screen.getByText('这是客户证言内容')).toBeInTheDocument();
const authors = screen.getAllByText('测试客户');
expect(authors.length).toBeGreaterThan(0);
const roles = screen.getAllByText('CTO');
expect(roles.length).toBeGreaterThan(0);
});
it('should render contact button', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const contactButton = screen.getByRole('link', { name: /联系我们/i });
expect(contactButton).toBeInTheDocument();
});
it('should render duration in sidebar', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
expect(screen.getByText('2年')).toBeInTheDocument();
});
});
describe('Sections', () => {
it('should render customer challenges section', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const section = screen.getByText('客户遇到的成长瓶颈');
expect(section).toBeInTheDocument();
});
it('should render solution section', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const section = screen.getByText('我们如何智连未来');
expect(section).toBeInTheDocument();
});
it('should render growth story section with key moments', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const section = screen.getByText('共同成长的故事');
expect(section).toBeInTheDocument();
expect(screen.getByText('关键时刻一')).toBeInTheDocument();
expect(screen.getByText('关键时刻二')).toBeInTheDocument();
});
it('should render achievements section with results', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const section = screen.getByText('今天,他们走到了哪里');
expect(section).toBeInTheDocument();
});
it('should render testimonial section', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const section = screen.getByText('客户证言精选');
expect(section).toBeInTheDocument();
});
});
describe('Conditional Rendering', () => {
it('should not render key moments section when empty', () => {
const caseWithoutMoments = { ...mockCaseItem, keyMoments: [] };
render(<CaseDetailClient caseItem={caseWithoutMoments} />);
expect(screen.queryByText('共同成长的故事')).not.toBeInTheDocument();
});
it('should not render results section when empty', () => {
const caseWithoutResults = { ...mockCaseItem, results: [] };
render(<CaseDetailClient caseItem={caseWithoutResults} />);
expect(screen.queryByText('今天,他们走到了哪里')).not.toBeInTheDocument();
});
it('should not render testimonial section when absent', () => {
const caseWithoutTestimonial = { ...mockCaseItem, testimonial: undefined };
render(<CaseDetailClient caseItem={caseWithoutTestimonial} />);
expect(screen.queryByText('客户证言精选')).not.toBeInTheDocument();
});
});
describe('Navigation', () => {
it('should have back button', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const backButton = screen.getByRole('button', { name: /返回/i });
expect(backButton).toBeInTheDocument();
});
});
describe('Accessibility', () => {
it('should have container element', () => {
const { container } = render(<CaseDetailClient caseItem={mockCaseItem} />);
expect(container.firstChild).toBeInTheDocument();
});
it('should have proper heading hierarchy', () => {
render(<CaseDetailClient caseItem={mockCaseItem} />);
const h1 = screen.getByRole('heading', { level: 1 });
expect(h1).toBeInTheDocument();
const h2s = screen.getAllByRole('heading', { level: 2 });
expect(h2s.length).toBeGreaterThan(0);
});
});
});
-286
View File
@@ -1,286 +0,0 @@
'use client';
import { useEffect, useRef, useState } from 'react';
import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { BackButton } from '@/components/ui/back-button';
import {
Target,
Quote,
Clock,
MessageCircle,
Award,
TrendingUp,
} from 'lucide-react';
interface CaseKeyMoment {
title: string;
description: string;
}
interface CaseResult {
label: string;
value: string;
}
interface CaseTestimonial {
quote: string;
author: string;
role: string;
}
interface CaseItem {
id: string;
title: string;
excerpt: string;
content: string;
category: string;
slug: string;
date: string;
image?: string;
/** 客户面临的挑战 */
challenge: string;
/** 我们的解决方案 */
solution: string;
/** 关键时刻 */
keyMoments: CaseKeyMoment[];
/** 成果数据 */
results: CaseResult[];
/** 客户证言 */
testimonial?: CaseTestimonial;
/** 合作时长 */
duration: string;
}
interface CaseDetailClientProps {
caseItem: CaseItem;
}
export function CaseDetailClient({ caseItem }: CaseDetailClientProps) {
const [isVisible, setIsVisible] = useState(false);
const contentRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const observer = new IntersectionObserver(
([entry]) => {
if (entry?.isIntersecting) {
setIsVisible(true);
}
},
{ threshold: 0.1 }
);
if (contentRef.current) {
observer.observe(contentRef.current);
}
return () => observer.disconnect();
}, []);
return (
<div className="min-h-screen bg-white">
<div className="relative overflow-hidden bg-gradient-to-b from-[#FAFAFA] to-white">
<div className="container-wide relative z-10 pt-32 pb-20">
<BackButton />
<div className="max-w-4xl mt-8">
<Badge className="mb-4 bg-[#C41E3A]/10 text-[#C41E3A] hover:bg-[#C41E3A]/20">
{caseItem.category}
</Badge>
<h1 className="text-3xl sm:text-4xl lg:text-5xl font-semibold text-[#1C1C1C] mb-2">
{caseItem.title}
</h1>
<p className="text-lg text-[#5C5C5C]">{caseItem.excerpt}</p>
</div>
</div>
</div>
<div ref={contentRef} className="container-wide py-12 md:py-16">
<div
className={`
grid lg:grid-cols-3 gap-8 lg:gap-12
opacity-0 translate-y-4
${isVisible ? 'animate-fade-in-up' : ''}
`}
>
<div className="lg:col-span-2 space-y-12">
{/* 客户遇到的成长瓶颈 */}
<section className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-8 border border-[#C41E3A]/20">
<div className="flex items-center gap-3 mb-6">
<div className="w-12 h-12 bg-[#C41E3A] rounded-xl flex items-center justify-center">
<MessageCircle className="w-6 h-6 text-white" />
</div>
<h2 className="text-2xl font-semibold text-[#1C1C1C]">
</h2>
</div>
<p className="text-[#5C5C5C] leading-relaxed text-lg">
{caseItem.challenge}
</p>
</section>
{/* 我们如何智连未来 */}
<section className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-8 border border-[#C41E3A]/20">
<div className="flex items-center gap-3 mb-6">
<div className="w-12 h-12 bg-[#C41E3A] rounded-xl flex items-center justify-center">
<Target className="w-6 h-6 text-white" />
</div>
<h2 className="text-2xl font-semibold text-[#1C1C1C]">
</h2>
</div>
<div className="prose prose-base max-w-none [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:text-[#1C1C1C] [&_h3]:mt-8 [&_h3]:mb-4 [&_p]:text-[#5C5C5C] [&_p]:leading-[1.8] [&_p]:mb-4 [&_p]:text-base">
<p className="text-[#5C5C5C] leading-relaxed text-lg">
{caseItem.solution}
</p>
</div>
</section>
{/* 共同成长的故事 */}
{caseItem.keyMoments && caseItem.keyMoments.length > 0 && (
<section className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-8 border border-[#C41E3A]/20">
<div className="flex items-center gap-3 mb-6">
<div className="w-12 h-12 bg-[#C41E3A] rounded-xl flex items-center justify-center">
<Clock className="w-6 h-6 text-white" />
</div>
<h2 className="text-2xl font-semibold text-[#1C1C1C]">
</h2>
</div>
<div className="space-y-4">
{caseItem.keyMoments.map((moment, index) => (
<div
key={index}
className="p-4 bg-white rounded-lg border border-[#E5E5E5]"
>
<div className="flex items-start gap-3">
<Quote className="w-5 h-5 text-[#C41E3A] flex-shrink-0 mt-0.5" />
<div>
<h4 className="font-semibold text-[#1C1C1C] mb-2">
{moment.title}
</h4>
<p className="text-sm text-[#737373]">
{moment.description}
</p>
</div>
</div>
</div>
))}
</div>
</section>
)}
{/* 今天,他们走到了哪里 */}
{caseItem.results && caseItem.results.length > 0 && (
<section className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-8 border border-[#C41E3A]/20">
<div className="flex items-center gap-3 mb-6">
<div className="w-12 h-12 bg-[#C41E3A] rounded-xl flex items-center justify-center">
<Award className="w-6 h-6 text-white" />
</div>
<h2 className="text-2xl font-semibold text-[#1C1C1C]">
</h2>
</div>
<div className="grid sm:grid-cols-3 gap-4">
{caseItem.results.map((result, index) => (
<div
key={index}
className="p-6 bg-white rounded-lg border border-[#E5E5E5] hover:border-[#C41E3A] transition-colors"
>
<TrendingUp className="w-8 h-8 text-[#C41E3A] mb-3" />
<div className="text-2xl font-semibold text-[#C41E3A] mb-1">
{result.value}
</div>
<div className="text-sm text-[#737373]">
{result.label}
</div>
</div>
))}
</div>
</section>
)}
{/* 客户证言精选 */}
{caseItem.testimonial && (
<section className="bg-gradient-to-br from-[#FFFBF5] to-white rounded-2xl p-8 border border-[#C41E3A]/20">
<div className="flex items-center gap-3 mb-6">
<div className="w-12 h-12 bg-[#C41E3A] rounded-xl flex items-center justify-center">
<Quote className="w-6 h-6 text-white" />
</div>
<h2 className="text-2xl font-semibold text-[#1C1C1C]">
</h2>
</div>
<div className="p-6 bg-white rounded-lg border border-[#E5E5E5]">
<Quote className="w-8 h-8 text-[#C41E3A] mb-4" />
<p className="text-lg text-[#1C1C1C] leading-relaxed mb-4">
{caseItem.testimonial.quote}
</p>
<div className="flex items-center gap-3">
<div className="w-12 h-12 bg-[#C41E3A] rounded-full flex items-center justify-center">
<span className="text-white font-semibold"></span>
</div>
<div>
<p className="font-semibold text-[#1C1C1C]">
{caseItem.testimonial.author}
</p>
<p className="text-sm text-[#737373]">
{caseItem.testimonial.role}
</p>
</div>
</div>
</div>
</section>
)}
</div>
{/* 侧边栏 */}
<div className="space-y-6">
<div className="p-6 bg-[#FAFAFA] rounded-lg border border-[#E5E5E5]">
<h3 className="text-lg font-semibold text-[#1C1C1C] mb-4">
</h3>
<dl className="space-y-3">
<div>
<dt className="text-sm text-[#737373]"></dt>
<dd className="text-[#1C1C1C] font-medium">
{caseItem.testimonial?.author || '客户企业'}
</dd>
</div>
<div>
<dt className="text-sm text-[#737373]"></dt>
<dd className="text-[#1C1C1C] font-medium">
{caseItem.category}
</dd>
</div>
<div>
<dt className="text-sm text-[#737373]"></dt>
<dd className="text-[#1C1C1C] font-medium">
{caseItem.duration || '3年'}
</dd>
</div>
<div>
<dt className="text-sm text-[#737373]"></dt>
<dd className="text-[#1C1C1C] font-medium">{caseItem.date}</dd>
</div>
</dl>
</div>
<div className="p-6 bg-gradient-to-br from-[#C41E3A] to-[#8B1429] rounded-lg text-white">
<h3 className="text-lg font-semibold mb-2"></h3>
<p className="text-sm text-white/80 mb-4">
</p>
<Button
className="w-full bg-white text-[#C41E3A] hover:bg-white/90"
asChild
>
<StaticLink href="/contact"></StaticLink>
</Button>
</div>
</div>
</div>
</div>
</div>
);
}
-52
View File
@@ -1,52 +0,0 @@
import { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { CASES } from '@/lib/constants';
import { CaseDetailClient } from './client';
export async function generateStaticParams() {
return CASES.map((caseItem) => ({
id: caseItem.id,
}));
}
export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise<Metadata> {
const { id } = await params;
const caseItem = CASES.find((c) => c.id === id);
if (!caseItem) {
return {
title: '案例未找到',
};
}
return {
title: `${caseItem.title} - 睿新致远`,
description: caseItem.description,
};
}
export default async function CaseDetailPage({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const caseItem = CASES.find((c) => c.id === id);
if (!caseItem) {
notFound();
}
return <CaseDetailClient caseItem={{
id: caseItem.id,
title: caseItem.title,
excerpt: caseItem.description,
content: caseItem.solution || '',
category: caseItem.industry,
slug: caseItem.id,
date: caseItem.date,
image: caseItem.image,
challenge: caseItem.challenge,
solution: caseItem.solution,
keyMoments: caseItem.keyMoments,
results: caseItem.results,
testimonial: caseItem.testimonial,
duration: caseItem.duration,
}} />;
}
-14
View File
@@ -1,14 +0,0 @@
import { Metadata } from 'next';
export const metadata: Metadata = {
title: '客户案例 - 睿新致远',
description: '与谁同行,决定能走多远',
};
export default function CasesLayout({
children,
}: {
children: React.ReactNode;
}) {
return <>{children}</>;
}
-255
View File
@@ -1,255 +0,0 @@
'use client';
import { useState, useMemo, useRef, ChangeEvent } from 'react';
import { useInView } from 'framer-motion';
import { CASES } from '@/lib/constants';
import { Badge } from '@/components/ui/badge';
import { Input } from '@/components/ui/input';
import { Button } from '@/components/ui/button';
import { PageHeader } from '@/components/ui/page-header';
import { Search, ArrowLeft, Building2, Calendar, TrendingUp, ChevronLeft, ChevronRight, Filter } from 'lucide-react';
import { StaticLink } from '@/components/ui/static-link';
import { motion } from 'framer-motion';
const industries = ['全部', ...Array.from(new Set(CASES.map((c) => c.industry)))];
const ITEMS_PER_PAGE = 6;
export default function CasesPage() {
const [selectedIndustry, setSelectedIndustry] = useState('全部');
const [searchQuery, setSearchQuery] = useState('');
const [currentPage, setCurrentPage] = useState(1);
const contentRef = useRef(null);
const isContentInView = useInView(contentRef, { once: true, margin: '-100px' });
const filteredCases = useMemo(() => {
return CASES.filter((caseItem) => {
const matchesIndustry = selectedIndustry === '全部' || caseItem.industry === selectedIndustry;
const matchesSearch =
caseItem.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
caseItem.description.toLowerCase().includes(searchQuery.toLowerCase());
return matchesIndustry && matchesSearch;
});
}, [selectedIndustry, searchQuery]);
const totalPages = Math.ceil(filteredCases.length / ITEMS_PER_PAGE);
const paginatedCases = useMemo(() => {
const startIndex = (currentPage - 1) * ITEMS_PER_PAGE;
const endIndex = startIndex + ITEMS_PER_PAGE;
return filteredCases.slice(startIndex, endIndex);
}, [filteredCases, currentPage]);
const handlePageChange = (page: number) => {
setCurrentPage(page);
window.scrollTo({ top: 0, behavior: 'smooth' });
};
const handleIndustryChange = (industry: string) => {
setSelectedIndustry(industry);
setCurrentPage(1);
};
const handleSearchChange = (e: ChangeEvent<HTMLInputElement>) => {
setSearchQuery(e.target.value);
setCurrentPage(1);
};
return (
<div className="min-h-screen bg-white">
<PageHeader
title="与谁同行,决定能走多远"
description="我们与优秀的企业同行,共同成长,共创未来"
/>
<div className="container-wide relative z-10 py-16" ref={contentRef}>
<div className="max-w-6xl mx-auto">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6 }}
className="mb-8 space-y-4"
>
<div className="flex flex-col md:flex-row gap-4 items-start md:items-center">
<div className="flex items-center gap-2 text-[#1C1C1C]">
<Filter className="w-5 h-5" />
<span className="font-medium"></span>
</div>
<div className="flex flex-wrap gap-2">
{industries.map((industry) => (
<Button
key={industry}
variant={selectedIndustry === industry ? 'default' : 'outline'}
onClick={() => handleIndustryChange(industry)}
className={
selectedIndustry === industry
? 'bg-[#C41E3A] hover:bg-[#A01830] text-white'
: ''
}
>
{industry}
</Button>
))}
</div>
</div>
<div className="relative max-w-md">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-[#5C5C5C] w-5 h-5" />
<Input
type="text"
placeholder="搜索案例..."
value={searchQuery}
onChange={handleSearchChange}
className="pl-10"
aria-label="搜索案例"
/>
</div>
</motion.div>
{paginatedCases.length === 0 ? (
<div className="text-center py-20">
<p className="text-xl text-[#5C5C5C]"></p>
</div>
) : (
<>
<div className="grid md:grid-cols-2 gap-8">
{paginatedCases.map((caseItem, index) => (
<motion.div
key={caseItem.id}
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.5, delay: index * 0.1 }}
>
<StaticLink
href={`/cases/${caseItem.id}`}
className="group bg-white rounded-2xl border border-[#E5E5E5] overflow-hidden hover:shadow-xl transition-all duration-300 block"
>
<div className="relative h-48 bg-gradient-to-br from-[#F5F5F5] to-[#E5E5E5] overflow-hidden">
<div className="absolute inset-0 flex items-center justify-center">
<Building2 className="w-24 h-24 text-[#C41E3A]/20 group-hover:scale-110 transition-transform duration-300" />
</div>
<div className="absolute top-4 right-4">
<Badge className="bg-white/90 text-[#1C1C1C] hover:bg-white">
{caseItem.industry}
</Badge>
</div>
</div>
<div className="p-6">
<div className="flex items-center gap-2 mb-3">
<Building2 className="w-5 h-5 text-[#C41E3A]" />
<span className="font-semibold text-[#1C1C1C]">{caseItem.client}</span>
</div>
<h3 className="text-xl font-bold text-[#1C1C1C] mb-3 group-hover:text-[#C41E3A] transition-colors">
{caseItem.title}
</h3>
<div className="flex flex-wrap gap-2 mb-4">
<Badge variant="secondary" className="flex items-center gap-1">
<Calendar className="w-3 h-3" />
{caseItem.duration}
</Badge>
{caseItem.tags.slice(0, 1).map((tag) => (
<Badge key={tag} variant="secondary" className="flex items-center gap-1">
<TrendingUp className="w-3 h-3" />
{tag}
</Badge>
))}
</div>
<p className="text-[#5C5C5C] text-sm line-clamp-2 mb-4">
{caseItem.description}
</p>
<div className="flex items-center text-[#C41E3A] font-medium group-hover:translate-x-2 transition-transform">
<ArrowLeft className="w-4 h-4 ml-2 rotate-180" />
</div>
</div>
</StaticLink>
</motion.div>
))}
</div>
{totalPages > 1 && (
<div className="flex justify-center items-center gap-2 mt-8">
<Button
variant="outline"
size="icon"
onClick={() => handlePageChange(currentPage - 1)}
disabled={currentPage === 1}
>
<ChevronLeft className="w-4 h-4" />
</Button>
{Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (
<Button
key={page}
variant={currentPage === page ? 'default' : 'outline'}
size="icon"
onClick={() => handlePageChange(page)}
className={
currentPage === page
? 'bg-[#C41E3A] hover:bg-[#A01830] text-white'
: ''
}
>
{page}
</Button>
))}
<Button
variant="outline"
size="icon"
onClick={() => handlePageChange(currentPage + 1)}
disabled={currentPage === totalPages}
>
<ChevronRight className="w-4 h-4" />
</Button>
</div>
)}
<div className="text-center mt-4 text-[#5C5C5C] text-sm">
{paginatedCases.length} {filteredCases.length}
</div>
</>
)}
</div>
</div>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.4 }}
className="bg-[#F5F5F5] py-16"
>
<div className="container-wide text-center">
<h2 className="text-3xl font-bold text-[#1C1C1C] mb-6">
</h2>
<p className="text-lg text-[#5C5C5C] mb-8 max-w-2xl mx-auto">
</p>
<div className="flex justify-center gap-4">
<StaticLink href="/contact">
<Button
size="lg"
variant="outline"
>
</Button>
</StaticLink>
<StaticLink href="/contact">
<Button
size="lg"
className="bg-[#C41E3A] hover:bg-[#A01830] text-white"
>
<ArrowLeft className="ml-2 w-4 h-4 rotate-180" />
</Button>
</StaticLink>
</div>
</div>
</motion.div>
</div>
);
}
+100 -104
View File
@@ -1,14 +1,16 @@
'use client';
import { useState, useEffect, useRef, Suspense } from 'react';
import { useState, useEffect, Suspense } from 'react';
import { useSearchParams } from 'next/navigation';
import { z } from 'zod';
import { motion } from 'framer-motion';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
import { Toast } from '@/components/ui/toast';
import { Mail, MapPin, Send, Loader2, Clock, HeadphonesIcon, CheckCircle2 } from 'lucide-react';
import { COMPANY_INFO } from '@/lib/constants';
import { PageNav } from '@/components/layout/page-nav';
import { trackContactForm, trackConversion } from '@/lib/analytics';
const contactFormSchema = z.object({
@@ -32,7 +34,6 @@ interface FormErrors {
function ContactFormContent() {
const searchParams = useSearchParams();
const isSuccessFromRedirect = searchParams.get('success') === 'true';
const [isVisible, setIsVisible] = useState(false);
const [showToast, setShowToast] = useState(isSuccessFromRedirect);
const [toastMessage, setToastMessage] = useState(
isSuccessFromRedirect ? '表单提交成功!我们会尽快与您联系。' : ''
@@ -50,13 +51,12 @@ function ContactFormContent() {
message: '',
});
const [errors, setErrors] = useState<FormErrors>({});
const sectionRef = useRef<HTMLElement>(null);
useEffect(() => {
requestAnimationFrame(() => {
setIsVisible(true);
});
}, []);
if (isSuccessFromRedirect) {
setShowToast(true);
}
}, [isSuccessFromRedirect]);
const validateField = (field: keyof ContactFormData, value: string) => {
try {
@@ -85,9 +85,9 @@ function ContactFormContent() {
async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
const result = contactFormSchema.safeParse(formData);
if (!result.success) {
const fieldErrors: FormErrors = {};
result.error.issues.forEach((issue) => {
@@ -161,48 +161,46 @@ function ContactFormContent() {
onClose={() => setShowToast(false)}
/>
)}
<section className="section-padding relative overflow-hidden" ref={sectionRef}>
<div className="absolute inset-0 pointer-events-none">
<div className="absolute inset-0 bg-gradient-radial from-[rgba(79,70,229,0.03)] via-transparent to-transparent" />
</div>
<div className="container-wide relative z-10">
<div
className={`
mb-16 opacity-0 translate-y-4
${isVisible ? 'animate-fade-in-up' : ''}
`}
<section className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '联系我们' }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
className="max-w-3xl"
>
<div className="flex items-center gap-3 mb-4">
<div className="w-8 h-px bg-linear-to-r from-[#1C1C1C] to-[#C41E3A]" />
<span className="text-sm text-[#5C5C5C] tracking-wide" data-testid="page-badge"></span>
</div>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-4">
<span className="text-[#C41E3A] font-calligraphy"></span>
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">Contact</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
</h1>
<p className="mt-4 text-[#5C5C5C] max-w-2xl" data-testid="page-description">
<p className="text-lg text-[#595959] leading-relaxed">
</p>
</div>
</motion.div>
</div>
</section>
<section className="pb-16">
<div className="container-wide">
<div className="grid lg:grid-cols-5 gap-12 lg:gap-16">
<div
className={`
lg:col-span-2 space-y-8 flex flex-col
opacity-0 translate-y-4
${isVisible ? 'animate-fade-in-up stagger-1' : ''}
`}
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="lg:col-span-2 space-y-6"
>
<div>
<h2 className="text-lg font-semibold text-[#1C1C1C] mb-6"></h2>
<div className="space-y-4" data-testid="contact-info">
<div className="flex items-start gap-4 group" data-testid="email-info">
<div className="w-10 h-10 bg-[#C41E3A] rounded-md flex items-center justify-center shrink-0 transition-transform duration-200 group-hover:scale-105">
<Mail className="w-5 h-5 text-white" />
<div className="w-10 h-10 bg-[#FEF2F4] rounded-lg flex items-center justify-center shrink-0 group-hover:scale-105 transition-transform duration-200">
<Mail className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<p className="text-sm text-[#5C5C5C] mb-1"></p>
<p className="text-sm text-[#595959] mb-1"></p>
<a href={`mailto:${COMPANY_INFO.email}`} className="text-[#1C1C1C] hover:text-[#C41E3A] transition-colors duration-200" data-testid="email-link">
{COMPANY_INFO.email}
</a>
@@ -210,31 +208,29 @@ function ContactFormContent() {
</div>
<div className="flex items-start gap-4 group" data-testid="address-info">
<div className="w-10 h-10 bg-[#C41E3A] rounded-md flex items-center justify-center shrink-0 transition-transform duration-200 group-hover:scale-105">
<MapPin className="w-5 h-5 text-white" />
<div className="w-10 h-10 bg-[#FEF2F4] rounded-lg flex items-center justify-center shrink-0 group-hover:scale-105 transition-transform duration-200">
<MapPin className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<p className="text-sm text-[#5C5C5C] mb-1"></p>
<p className="text-sm text-[#595959] mb-1"></p>
<p className="text-[#1C1C1C]" data-testid="address-text">{COMPANY_INFO.address}</p>
</div>
</div>
</div>
</div>
<div className="bg-[#FFFBF5] p-5 rounded-lg border border-[#E5E5E5]" data-testid="work-hours-card">
<div className="p-5 rounded-xl border border-[#E5E5E5]" data-testid="work-hours-card">
<div className="flex items-center gap-2 mb-3">
<Clock className="w-4 h-4 text-[#C41E3A]" />
<h2 className="text-sm font-medium text-[#1C1C1C]"></h2>
</div>
<div className="space-y-1">
<div className="flex justify-between text-sm" data-testid="work-hours-row">
<span className="text-[#5C5C5C]"></span>
<span className="text-[#C41E3A]">9:00 - 18:00</span>
</div>
<div className="flex justify-between text-sm" data-testid="work-hours-row">
<span className="text-[#595959]"></span>
<span className="text-[#C41E3A] font-medium">9:00 - 18:00</span>
</div>
</div>
<div className="bg-[#FFFBF5] p-5 rounded-lg border border-[#E5E5E5]">
<div className="p-5 rounded-xl border border-[#E5E5E5]">
<div className="flex items-center gap-2 mb-3">
<HeadphonesIcon className="w-4 h-4 text-[#C41E3A]" />
<h2 className="text-sm font-medium text-[#1C1C1C]"></h2>
@@ -242,111 +238,111 @@ function ContactFormContent() {
<div className="space-y-3">
<div className="flex items-start gap-2">
<div className="w-1.5 h-1.5 bg-[#C41E3A] rounded-full mt-2 shrink-0" />
<p className="text-sm text-[#5C5C5C]"> 2 </p>
<p className="text-sm text-[#595959]"> 2 </p>
</div>
<div className="flex items-start gap-2">
<div className="w-1.5 h-1.5 bg-[#C41E3A] rounded-full mt-2 shrink-0" />
<p className="text-sm text-[#5C5C5C]"></p>
<p className="text-sm text-[#595959]"></p>
</div>
<div className="flex items-start gap-2">
<div className="w-1.5 h-1.5 bg-[#C41E3A] rounded-full mt-2 shrink-0" />
<p className="text-sm text-[#5C5C5C]"></p>
<p className="text-sm text-[#595959]"></p>
</div>
</div>
</div>
</div>
</motion.div>
<div
className={`
lg:col-span-3 flex flex-col
opacity-0 translate-y-4
${isVisible ? 'animate-fade-in-up stagger-2' : ''}
`}
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: 0.1 }}
className="lg:col-span-3"
>
<div className="bg-[#F5F7FA] p-6 sm:p-8 rounded-lg border border-[#E2E8F0] flex-1 flex flex-col">
<h2 className="text-lg font-semibold text-[#1A1A2E] mb-6"></h2>
<div className="p-6 sm:p-8 rounded-xl border border-[#E5E5E5] bg-[#FAFAFA]">
<h2 className="text-lg font-semibold text-[#1C1C1C] mb-6"></h2>
{isSubmitted ? (
<div className="text-center py-12 flex-1 flex items-center justify-center">
<div className="w-16 h-16 bg-[#C41E3A] rounded-full flex items-center justify-center mx-auto mb-4 animate-stamp-in">
<div className="text-center py-12">
<div className="w-16 h-16 bg-[#C41E3A] rounded-full flex items-center justify-center mx-auto mb-4">
<CheckCircle2 className="w-8 h-8 text-white" />
</div>
<h4 className="text-xl font-semibold text-[#1A1A2E] mb-2"></h4>
<p className="text-[#718096]"></p>
<h4 className="text-xl font-semibold text-[#1C1C1C] mb-2"></h4>
<p className="text-[#595959]"></p>
</div>
) : (
<form onSubmit={handleSubmit} className="space-y-5 flex-1 flex flex-col">
<form onSubmit={handleSubmit} className="space-y-5">
<input type="text" name="website" style={{ display: 'none' }} tabIndex={-1} autoComplete="off" />
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<Input
<Input
name="name"
data-testid="name-input"
label="姓名"
id="name"
placeholder="请输入您的姓名"
required
id="name"
placeholder="请输入您的姓名"
required
value={formData.name}
onChange={(e) => handleChange('name', e.target.value)}
onBlur={(e) => handleBlur('name', e.target.value)}
error={errors.name}
/>
<Input
<Input
name="phone"
data-testid="phone-input"
label="电话"
id="phone"
type="tel"
placeholder="请输入您的电话"
required
id="phone"
type="tel"
placeholder="请输入您的电话"
required
value={formData.phone}
onChange={(e) => handleChange('phone', e.target.value)}
onBlur={(e) => handleBlur('phone', e.target.value)}
error={errors.phone}
/>
</div>
<Input
<Input
name="email"
data-testid="email-input"
label="邮箱"
id="email"
type="email"
placeholder="请输入您的邮箱"
required
id="email"
type="email"
placeholder="请输入您的邮箱"
required
value={formData.email}
onChange={(e) => handleChange('email', e.target.value)}
onBlur={(e) => handleBlur('email', e.target.value)}
error={errors.email}
/>
<Input
onBlur={(e) => handleBlur('email', e.target.value)}
error={errors.email}
/>
<Input
name="subject"
data-testid="subject-input"
label="主题"
id="subject"
placeholder="请输入消息主题"
required
id="subject"
placeholder="请输入消息主题"
required
value={formData.subject}
onChange={(e) => handleChange('subject', e.target.value)}
onBlur={(e) => handleBlur('subject', e.target.value)}
error={errors.subject}
/>
<Textarea
onChange={(e) => handleChange('subject', e.target.value)}
onBlur={(e) => handleBlur('subject', e.target.value)}
error={errors.subject}
/>
<Textarea
name="message"
data-testid="message-input"
label="留言内容"
id="message"
placeholder="请输入您想咨询的内容"
id="message"
placeholder="请输入您想咨询的内容"
rows={5}
required
required
value={formData.message}
onChange={(e) => handleChange('message', e.target.value)}
onBlur={(e) => handleBlur('message', e.target.value)}
error={errors.message}
/>
<Button
type="submit"
onChange={(e) => handleChange('message', e.target.value)}
onBlur={(e) => handleBlur('message', e.target.value)}
error={errors.message}
/>
<Button
type="submit"
data-testid="submit-button"
size="lg"
className="w-full group mt-auto min-h-13 md:min-h-0"
className="w-full bg-[#C41E3A] hover:bg-[#A01830] text-white min-h-13 md:min-h-0"
disabled={isSubmitting}
>
{isSubmitting ? (
@@ -356,7 +352,7 @@ function ContactFormContent() {
</>
) : (
<>
<Send className="mr-2 h-4 w-4 transition-transform group-hover:translate-x-0.5" />
<Send className="mr-2 h-4 w-4" />
</>
)}
@@ -364,7 +360,7 @@ function ContactFormContent() {
</form>
)}
</div>
</div>
</motion.div>
</div>
</div>
</section>
@@ -376,7 +372,7 @@ export default function ContactPage() {
return (
<Suspense fallback={
<div className="min-h-screen bg-white flex items-center justify-center">
<div className="animate-pulse text-[#5C5C5C]">...</div>
<div className="animate-pulse text-[#595959]">...</div>
</div>
}>
<ContactFormContent />
-43
View File
@@ -1,17 +1,9 @@
'use client';
import { useEffect } from 'react';
import { useSearchParams } from 'next/navigation';
import dynamic from 'next/dynamic';
import { HeroSectionV2 } from '@/components/sections/hero-section-v2';
import { SectionSkeleton } from '@/components/ui/loading-skeleton';
declare global {
interface Window {
__isProgrammaticScroll?: boolean;
}
}
const SocialProofSection = dynamic(
() => import('@/components/sections/social-proof-section').then(mod => ({ default: mod.SocialProofSection })),
{ loading: () => <SectionSkeleton />, ssr: false }
@@ -33,41 +25,6 @@ const CTASection = dynamic(
);
function HomeContentV2() {
const searchParams = useSearchParams();
useEffect(() => {
const section = searchParams.get('section');
if (!section) {return;}
const maxAttempts = 50;
const interval = 100;
let attempts = 0;
const scrollToSection = () => {
const targetElement = document.getElementById(section);
if (targetElement) {
window.__isProgrammaticScroll = true;
targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(() => {
window.__isProgrammaticScroll = false;
}, 2000);
return true;
}
return false;
};
if (scrollToSection()) {return;}
const timer = setInterval(() => {
attempts++;
if (scrollToSection() || attempts >= maxAttempts) {
clearInterval(timer);
}
}, interval);
return () => clearInterval(timer);
}, [searchParams]);
return (
<main id="main-content" className="min-h-screen bg-white">
<HeroSectionV2 />
-20
View File
@@ -1,39 +1,19 @@
'use client';
import { usePathname } from 'next/navigation';
import { ErrorBoundary } from '@/components/ui/error-boundary';
import { Header } from '@/components/layout/header';
import { Footer } from '@/components/layout/footer';
import { Breadcrumb } from '@/components/layout/breadcrumb';
const breadcrumbMap: Record<string, { label: string; href: string }> = {
'/about': { label: '关于我们', href: '/about' },
'/cases': { label: '成功案例', href: '/cases' },
'/services': { label: '核心业务', href: '/services' },
'/products': { label: '产品服务', href: '/products' },
'/solutions': { label: '解决方案', href: '/solutions' },
'/news': { label: '新闻动态', href: '/news' },
'/contact': { label: '联系我们', href: '/contact' },
};
export default function MarketingLayout({
children,
}: {
children: React.ReactNode;
}) {
const pathname = usePathname();
const breadcrumbItem = breadcrumbMap[pathname];
return (
<div className="min-h-screen flex flex-col">
<Header />
<ErrorBoundary>
<main id="main-content" className="flex-1 pt-16">
{breadcrumbItem && (
<div className="container-wide">
<Breadcrumb items={[breadcrumbItem]} />
</div>
)}
{children}
</main>
</ErrorBoundary>
@@ -3,11 +3,9 @@
import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { BackButton } from '@/components/ui/back-button';
import { Calendar, ArrowLeft } from 'lucide-react';
import { PageNav } from '@/components/layout/page-nav';
import { Calendar, ArrowLeft, Newspaper } from 'lucide-react';
import { motion } from 'framer-motion';
import { useInView } from 'framer-motion';
import { useRef } from 'react';
import { NEWS } from '@/lib/constants';
interface NewsDetailClientProps {
@@ -15,45 +13,48 @@ interface NewsDetailClientProps {
}
export function NewsDetailClient({ news }: NewsDetailClientProps) {
const contentRef = useRef(null);
const isContentInView = useInView(contentRef, { once: true, margin: '-100px' });
const relatedNews = NEWS
.filter((n) => n.id !== news.id && n.category === news.category)
.slice(0, 3);
return (
<div className="min-h-screen bg-white">
<div className="relative overflow-hidden bg-linear-to-b from-[#FAFAFA] to-white">
<div className="container-wide relative z-10 pt-32 pb-20">
<BackButton />
<div className="max-w-4xl">
<div className="inline-block px-4 py-2 bg-[#C41E3A]/10 rounded-full text-[#C41E3A] text-sm mb-6">
<section className="pt-32 pb-12">
<div className="container-wide">
<PageNav items={[{ label: '新闻动态', href: '/news' }, { label: news.title }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
className="max-w-4xl mt-6"
>
<Badge className="mb-4 bg-[#C41E3A]/10 text-[#C41E3A] hover:bg-[#C41E3A]/20 border-0">
{news.category}
</div>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6">
</Badge>
<h1 className="text-3xl sm:text-4xl lg:text-5xl font-bold text-[#1C1C1C] mb-4 tracking-tight">
{news.title}
</h1>
<div className="flex items-center gap-6 text-[#5C5C5C]">
<div className="flex items-center gap-2">
<Calendar className="w-5 h-5" />
<div className="flex items-center gap-4 text-[#595959] text-sm">
<div className="flex items-center gap-1.5">
<Calendar className="w-4 h-4" />
{news.date}
</div>
</div>
</div>
</motion.div>
</div>
</div>
</section>
<div className="container-wide relative z-10 py-16" ref={contentRef}>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6 }}
className="max-w-4xl"
>
<article className="prose prose-lg max-w-none">
<section className="pb-16">
<div className="container-wide">
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="max-w-4xl"
>
{news.image ? (
<div className="aspect-video rounded-lg overflow-hidden mb-8">
<div className="aspect-video rounded-xl overflow-hidden mb-8">
<img
src={news.image}
alt={news.title}
@@ -61,73 +62,69 @@ export function NewsDetailClient({ news }: NewsDetailClientProps) {
/>
</div>
) : (
<div className="aspect-video bg-linear-to-br from-[#C41E3A]/10 to-[#1C1C1C]/10 rounded-lg mb-8 flex items-center justify-center">
<span className="text-6xl">📰</span>
<div className="aspect-video bg-gradient-to-br from-[#FEF2F4] to-[#F5F5F5] rounded-xl mb-8 flex items-center justify-center">
<Newspaper className="w-16 h-16 text-[#C41E3A]/30" />
</div>
)}
<p className="text-xl text-[#5C5C5C] leading-relaxed mb-8 border-l-4 border-[#C41E3A] pl-6">
{news.excerpt}
</p>
<div className="border-l-4 border-[#C41E3A] pl-6 mb-8">
<p className="text-lg text-[#595959] leading-relaxed">
{news.excerpt}
</p>
</div>
<div className="text-[#1C1C1C] leading-relaxed whitespace-pre-line">
{news.content}
</div>
</article>
{relatedNews.length > 0 && (
<div className="mt-16 pt-16 border-t border-[#E5E5E5]">
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-8">
</h2>
<div className="grid md:grid-cols-3 gap-6">
{relatedNews.map((related) => (
<StaticLink key={related.id} href={`/news/${related.id}`}>
<div className="group cursor-pointer">
<div className="aspect-video rounded-lg mb-4 overflow-hidden group-hover:shadow-lg transition-shadow">
{related.image ? (
<img
src={related.image}
alt={related.title}
className="w-full h-full object-cover"
/>
) : (
<div className="w-full h-full bg-linear-to-br from-[#C41E3A]/10 to-[#1C1C1C]/10 flex items-center justify-center">
<span className="text-4xl">📰</span>
</div>
)}
{relatedNews.length > 0 && (
<div className="mt-16 pt-12 border-t border-[#E5E5E5]">
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-8"></h2>
<div className="grid md:grid-cols-3 gap-6">
{relatedNews.map((related) => (
<StaticLink key={related.id} href={`/news/${related.id}`}>
<div className="group cursor-pointer">
<div className="aspect-video rounded-lg mb-4 overflow-hidden">
{related.image ? (
<img
src={related.image}
alt={related.title}
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"
/>
) : (
<div className="w-full h-full bg-gradient-to-br from-[#FEF2F4] to-[#F5F5F5] flex items-center justify-center">
<Newspaper className="w-8 h-8 text-[#C41E3A]/30" />
</div>
)}
</div>
<Badge variant="secondary" className="mb-2 text-xs">{related.category}</Badge>
<h3 className="text-base font-semibold text-[#1C1C1C] mb-1 line-clamp-2 group-hover:text-[#C41E3A] transition-colors">
{related.title}
</h3>
<p className="text-sm text-[#595959] line-clamp-2">{related.excerpt}</p>
</div>
<Badge variant="secondary" className="mb-2">
{related.category}
</Badge>
<h3 className="text-lg font-semibold text-[#1C1C1C] mb-2 line-clamp-2 group-hover:text-[#C41E3A] transition-colors">
{related.title}
</h3>
<p className="text-sm text-[#5C5C5C] line-clamp-2">
{related.excerpt}
</p>
</div>
</StaticLink>
))}
</StaticLink>
))}
</div>
</div>
</div>
)}
)}
<div className="mt-16 flex justify-center gap-4">
<StaticLink href="/news">
<Button variant="outline" size="lg">
<ArrowLeft className="w-4 h-4 mr-2" />
</Button>
</StaticLink>
<StaticLink href="/contact">
<Button size="lg" className="bg-[#C41E3A] hover:bg-[#A01830] text-white">
</Button>
</StaticLink>
</div>
</motion.div>
</div>
<div className="mt-12 flex justify-center gap-4">
<StaticLink href="/news">
<Button variant="outline" size="lg">
<ArrowLeft className="w-4 h-4 mr-2" />
</Button>
</StaticLink>
<StaticLink href="/contact">
<Button size="lg" className="bg-[#C41E3A] hover:bg-[#A01830] text-white">
</Button>
</StaticLink>
</div>
</motion.div>
</div>
</section>
</div>
);
}
+11
View File
@@ -0,0 +1,11 @@
import { Metadata } from 'next';
import { COMPANY_INFO } from '@/lib/constants';
export const metadata: Metadata = {
title: `新闻动态 - ${COMPANY_INFO.shortName}`,
description: `了解${COMPANY_INFO.shortName}最新动态,把握行业发展脉搏。`,
};
export default function NewsLayout({ children }: { children: React.ReactNode }) {
return children;
}
+119 -117
View File
@@ -1,16 +1,14 @@
'use client';
import { useState, useMemo, useRef, ChangeEvent } from 'react';
import { useInView } from 'framer-motion';
import { useState, useMemo, ChangeEvent } from 'react';
import { motion } from 'framer-motion';
import { NEWS } from '@/lib/constants';
import { Card, CardContent } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Input } from '@/components/ui/input';
import { Button } from '@/components/ui/button';
import { PageHeader } from '@/components/ui/page-header';
import { Search, Calendar, Filter, ChevronLeft, ChevronRight, ArrowRight } from 'lucide-react';
import { StaticLink } from '@/components/ui/static-link';
import { motion } from 'framer-motion';
import { Search, Calendar, ChevronLeft, ChevronRight, ArrowRight, Newspaper } from 'lucide-react';
import { PageNav } from '@/components/layout/page-nav';
const categories = ['全部', '公司新闻', '产品发布'];
const ITEMS_PER_PAGE = 9;
@@ -19,8 +17,7 @@ export default function NewsListPage() {
const [selectedCategory, setSelectedCategory] = useState('全部');
const [searchQuery, setSearchQuery] = useState('');
const [currentPage, setCurrentPage] = useState(1);
const contentRef = useRef(null);
const isContentInView = useInView(contentRef, { once: true, margin: '-100px' });
const filteredNews = useMemo(() => {
return NEWS.filter((newsItem) => {
const matchesCategory = selectedCategory === '全部' || newsItem.category === selectedCategory;
@@ -34,8 +31,7 @@ export default function NewsListPage() {
const totalPages = Math.ceil(filteredNews.length / ITEMS_PER_PAGE);
const paginatedNews = useMemo(() => {
const startIndex = (currentPage - 1) * ITEMS_PER_PAGE;
const endIndex = startIndex + ITEMS_PER_PAGE;
return filteredNews.slice(startIndex, endIndex);
return filteredNews.slice(startIndex, startIndex + ITEMS_PER_PAGE);
}, [filteredNews, currentPage]);
const handlePageChange = (page: number) => {
@@ -55,23 +51,35 @@ export default function NewsListPage() {
return (
<div className="min-h-screen bg-white">
<PageHeader
title="新闻动态"
description="了解睿新致远最新动态,把握行业发展脉搏"
/>
<section className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '新闻动态' }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
className="max-w-3xl"
>
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">News</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
</h1>
<p className="text-lg text-[#595959] leading-relaxed">
</p>
</motion.div>
</div>
</section>
<div className="container-wide relative z-10 py-12" ref={contentRef}>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6 }}
className="mb-8 space-y-4"
>
<div className="flex flex-col md:flex-row gap-4 items-start md:items-center">
<div className="flex items-center gap-2 text-[#1C1C1C]">
<Filter className="w-5 h-5" />
<span className="font-medium"></span>
</div>
<section className="pb-16">
<div className="container-wide">
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="mb-8 space-y-4"
>
<div className="flex flex-wrap gap-2">
{categories.map((category) => (
<Button
@@ -88,121 +96,115 @@ export default function NewsListPage() {
</Button>
))}
</div>
</div>
<div className="relative max-w-md">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-[#5C5C5C] w-5 h-5" />
<Input
type="text"
placeholder="搜索新闻..."
value={searchQuery}
onChange={handleSearchChange}
className="pl-10"
aria-label="搜索新闻"
/>
</div>
</motion.div>
<div className="relative max-w-md">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-[#595959] w-5 h-5" />
<Input
type="text"
placeholder="搜索新闻..."
value={searchQuery}
onChange={handleSearchChange}
className="pl-10"
aria-label="搜索新闻"
/>
</div>
</motion.div>
{paginatedNews.length === 0 ? (
<div className="text-center py-20">
<p className="text-xl text-[#5C5C5C]"></p>
</div>
) : (
<>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{paginatedNews.map((newsItem, index) => (
<motion.div
key={newsItem.id}
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.5, delay: 0.2 + index * 0.1 }}
>
<StaticLink href={`/news/${newsItem.id}`}>
<Card className="h-full hover:shadow-lg transition-shadow cursor-pointer border-[#E5E5E5] hover:border-[#C41E3A]">
<CardContent className="p-0">
{paginatedNews.length === 0 ? (
<div className="text-center py-20">
<Newspaper className="w-12 h-12 text-[#E5E5E5] mx-auto mb-4" />
<p className="text-lg text-[#595959]"></p>
</div>
) : (
<>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{paginatedNews.map((newsItem, index) => (
<motion.div
key={newsItem.id}
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: index * 0.1 }}
>
<StaticLink href={`/news/${newsItem.id}`}>
<div className="group h-full bg-white rounded-xl border border-[#E5E5E5] overflow-hidden hover:border-[#C41E3A]/30 hover:shadow-md transition-all duration-300">
{newsItem.image ? (
<div className="aspect-video bg-gray-100 overflow-hidden">
<img
src={newsItem.image}
<div className="aspect-video bg-[#F5F5F5] overflow-hidden">
<img
src={newsItem.image}
alt={newsItem.title}
className="w-full h-full object-cover"
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"
/>
</div>
) : (
<div className="aspect-video bg-gradient-to-br from-[#C41E3A]/10 to-[#1C1C1C]/10 flex items-center justify-center mb-4">
<span className="text-4xl">📰</span>
<div className="aspect-video bg-gradient-to-br from-[#FEF2F4] to-[#F5F5F5] flex items-center justify-center">
<Newspaper className="w-12 h-12 text-[#C41E3A]/30" />
</div>
)}
<div className="p-6">
<div className="flex items-center gap-2 mb-3">
<Badge variant="secondary">{newsItem.category}</Badge>
<div className="flex items-center gap-1 text-sm text-[#5C5C5C]">
<Calendar className="w-4 h-4" />
<Badge variant="secondary" className="text-xs">{newsItem.category}</Badge>
<div className="flex items-center gap-1 text-xs text-[#595959]">
<Calendar className="w-3 h-3" />
{newsItem.date}
</div>
</div>
<h3 className="text-xl font-semibold text-[#1C1C1C] mb-3 line-clamp-2">
<h3 className="text-lg font-semibold text-[#1C1C1C] mb-2 line-clamp-2 group-hover:text-[#C41E3A] transition-colors">
{newsItem.title}
</h3>
<p className="text-[#5C5C5C] text-sm line-clamp-3 mb-4">
<p className="text-sm text-[#595959] line-clamp-3 mb-4">
{newsItem.excerpt}
</p>
<div className="flex items-center text-[#C41E3A] text-sm font-medium group">
<div className="flex items-center text-[#C41E3A] text-sm font-medium">
<ArrowRight className="ml-1 w-4 h-4" />
<ArrowRight className="ml-1 w-4 h-4 group-hover:translate-x-1 transition-transform" />
</div>
</div>
</CardContent>
</Card>
</StaticLink>
</motion.div>
))}
</div>
{totalPages > 1 && (
<div className="flex justify-center items-center gap-2 mt-8">
<Button
variant="outline"
size="icon"
onClick={() => handlePageChange(currentPage - 1)}
disabled={currentPage === 1}
>
<ChevronLeft className="w-4 h-4" />
</Button>
{Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (
<Button
key={page}
variant={currentPage === page ? 'default' : 'outline'}
size="icon"
onClick={() => handlePageChange(page)}
className={
currentPage === page
? 'bg-[#C41E3A] hover:bg-[#A01830] text-white'
: ''
}
>
{page}
</Button>
</div>
</StaticLink>
</motion.div>
))}
<Button
variant="outline"
size="icon"
onClick={() => handlePageChange(currentPage + 1)}
disabled={currentPage === totalPages}
>
<ChevronRight className="w-4 h-4" />
</Button>
</div>
)}
<div className="text-center mt-4 text-[#5C5C5C] text-sm">
{paginatedNews.length} {filteredNews.length}
</div>
</>
)}
</div>
{totalPages > 1 && (
<div className="flex justify-center items-center gap-2 mt-8">
<Button
variant="outline"
size="icon"
onClick={() => handlePageChange(currentPage - 1)}
disabled={currentPage === 1}
>
<ChevronLeft className="w-4 h-4" />
</Button>
{Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (
<Button
key={page}
variant={currentPage === page ? 'default' : 'outline'}
size="icon"
onClick={() => handlePageChange(page)}
className={
currentPage === page
? 'bg-[#C41E3A] hover:bg-[#A01830] text-white'
: ''
}
>
{page}
</Button>
))}
<Button
variant="outline"
size="icon"
onClick={() => handlePageChange(currentPage + 1)}
disabled={currentPage === totalPages}
>
<ChevronRight className="w-4 h-4" />
</Button>
</div>
)}
</>
)}
</div>
</section>
</div>
);
}
+1 -7
View File
@@ -1,11 +1,5 @@
import { Suspense } from 'react';
import { HomeContentV2 } from './home-content-v2';
import { SectionSkeleton } from '@/components/ui/loading-skeleton';
export default function HomePage() {
return (
<Suspense fallback={<SectionSkeleton />}>
<HomeContentV2 />
</Suspense>
);
return <HomeContentV2 />;
}
+2 -2
View File
@@ -2,7 +2,7 @@ import { notFound } from 'next/navigation';
import { StaticLink } from '@/components/ui/static-link';
import { PRODUCTS } from '@/lib/constants';
import { Button } from '@/components/ui/button';
import { BackButton } from '@/components/ui/back-button';
import { PageNav } from '@/components/layout/page-nav';
import { CheckCircle2, Zap, Target, Layers, ArrowRight } from 'lucide-react';
export async function generateStaticParams() {
@@ -37,7 +37,7 @@ export default async function ProductDetailPage({ params }: { params: Promise<{
<div className="min-h-screen bg-white">
<div className="pt-32 pb-16">
<div className="container-wide">
<BackButton />
<PageNav items={[{ label: '产品', href: '/products' }, { label: product.title }]} />
<div className="max-w-4xl mt-8">
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">{product.category}</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
+11
View File
@@ -0,0 +1,11 @@
import { Metadata } from 'next';
import { COMPANY_INFO } from '@/lib/constants';
export const metadata: Metadata = {
title: `产品 - ${COMPANY_INFO.shortName}`,
description: `自主研发的企业级产品,助力企业高效运营,实现数字化转型。${COMPANY_INFO.shortName}提供ERP、CRM、BI、CMS等产品。`,
};
export default function ProductsLayout({ children }: { children: React.ReactNode }) {
return children;
}
+3 -1
View File
@@ -6,12 +6,14 @@ import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { ArrowRight } from 'lucide-react';
import { motion } from 'framer-motion';
import { PageNav } from '@/components/layout/page-nav';
export default function ProductsPage() {
return (
<div className="min-h-screen bg-white">
<section className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '产品' }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
@@ -20,7 +22,7 @@ export default function ProductsPage() {
>
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">Products</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
</h1>
<p className="text-lg text-[#595959] leading-relaxed">
+15 -43
View File
@@ -2,17 +2,16 @@
import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { BackButton } from '@/components/ui/back-button';
import { PageNav } from '@/components/layout/page-nav';
import {
CheckCircle2,
TrendingUp,
Users,
Target,
Clock,
MessageCircle,
ArrowRight,
} from 'lucide-react';
import { SERVICES, CASES } from '@/lib/constants';
import { SERVICES } from '@/lib/constants';
interface ServiceDetailClientProps {
service: typeof SERVICES[number];
@@ -47,39 +46,38 @@ const challenges: Record<string, { title: string; description: string }[]> = {
const outcomes: Record<string, { value: string; label: string }[]> = {
software: [
{ value: '30%', label: '开发效率提升' },
{ value: '50%', label: '返工率降低' },
{ value: '100%', label: '按时交付率' },
{ value: '30%+', label: '预期开发效率提升' },
{ value: '50%+', label: '预期返工率降低' },
{ value: '严格', label: '交付质量把控' },
],
data: [
{ value: '70%', label: '决策效率提升' },
{ value: '实时', label: '数据更新' },
{ value: '100+', label: '可视化报表' },
{ value: '自助式', label: '分析模式' },
{ value: '多维度', label: '可视化报表' },
],
consulting: [
{ value: '60%', label: '方向明确度' },
{ value: '40%', label: '试错成本降低' },
{ value: '3x', label: '转型速度提升' },
{ value: '清晰', label: '转型方向规划' },
{ value: '系统化', label: '技术选型评估' },
{ value: '可落地', label: '实施路径设计' },
],
solutions: [
{ value: '50%', label: '实施周期缩短' },
{ value: '30%', label: '成本降低' },
{ value: '95%', label: '客户满意度' },
{ value: '标准化', label: '行业方案交付' },
{ value: '端到端', label: '全流程实施' },
{ value: '持续化', label: '运维优化支持' },
],
};
export function ServiceDetailClient({ service }: ServiceDetailClientProps) {
const serviceChallenges = challenges[service.id] ?? [];
const serviceOutcomes = outcomes[service.id] ?? [];
const relatedCases = CASES.slice(0, 2);
return (
<div className="min-h-screen bg-white">
<div className="pt-32 pb-16">
<div className="container-wide">
<BackButton />
<PageNav items={[{ label: '服务', href: '/services' }, { label: service.title }]} />
<div className="max-w-4xl mt-8">
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase"></p>
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">Services</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
{service.title}
</h1>
@@ -178,32 +176,6 @@ export function ServiceDetailClient({ service }: ServiceDetailClientProps) {
</div>
</section>
<section>
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-[#FEF2F4] rounded-lg flex items-center justify-center">
<Users className="w-5 h-5 text-[#C41E3A]" />
</div>
<h2 className="text-2xl font-bold text-[#1C1C1C]"></h2>
</div>
<div className="grid md:grid-cols-2 gap-4">
{relatedCases.map((caseItem) => (
<StaticLink
key={caseItem.id}
href={`/cases/${caseItem.id}`}
className="group p-4 bg-[#F5F5F5] rounded-lg hover:bg-[#FEF2F4] transition-colors"
>
<p className="text-xs text-[#C41E3A] font-medium mb-1">{caseItem.industry}</p>
<h3 className="font-semibold text-[#1C1C1C] group-hover:text-[#C41E3A] transition-colors text-sm">
{caseItem.title}
</h3>
<p className="text-sm text-[#595959] mt-2 line-clamp-2">
{caseItem.description}
</p>
</StaticLink>
))}
</div>
</section>
<div className="flex justify-center gap-4 pt-8 border-t border-[#E5E5E5]">
<StaticLink href="/services">
<Button variant="outline" size="lg"></Button>
+11
View File
@@ -0,0 +1,11 @@
import { Metadata } from 'next';
import { COMPANY_INFO } from '@/lib/constants';
export const metadata: Metadata = {
title: `服务 - ${COMPANY_INFO.shortName}`,
description: `专业技术团队,为您提供全方位的数字化解决方案。${COMPANY_INFO.shortName}涵盖软件开发、数据分析、咨询服务等核心业务。`,
};
export default function ServicesLayout({ children }: { children: React.ReactNode }) {
return children;
}
+3 -1
View File
@@ -5,12 +5,14 @@ import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { ArrowRight, ArrowUpRight } from 'lucide-react';
import { motion } from 'framer-motion';
import { PageNav } from '@/components/layout/page-nav';
export default function ServicesPage() {
return (
<div className="min-h-screen bg-white">
<section className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '服务' }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
@@ -19,7 +21,7 @@ export default function ServicesPage() {
>
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">Services</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
</h1>
<p className="text-lg text-[#595959] leading-relaxed">
@@ -0,0 +1,133 @@
'use client';
import { motion } from 'framer-motion';
import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { PageNav } from '@/components/layout/page-nav';
import { ArrowRight, AlertTriangle, CheckCircle2, Package } from 'lucide-react';
import type { Solution } from '@/lib/constants/solutions';
import type { Product } from '@/lib/constants/products';
interface SolutionDetailClientProps {
solution: Solution;
relatedProducts: Product[];
}
export function SolutionDetailClient({ solution, relatedProducts }: SolutionDetailClientProps) {
return (
<div className="min-h-screen bg-white">
<div className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '解决方案', href: '/solutions' }, { label: solution.title }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
className="max-w-4xl mt-8"
>
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">
{solution.industry}
</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-4 tracking-tight">
{solution.title}
</h1>
<p className="text-xl text-[#595959] mb-2">{solution.subtitle}</p>
<p className="text-lg text-[#595959] leading-relaxed">
{solution.description}
</p>
</motion.div>
</div>
</div>
<div className="container-wide pb-20">
<div className="max-w-4xl space-y-16">
<motion.section
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 flex items-center gap-3">
<AlertTriangle className="w-6 h-6 text-[#C41E3A]" />
</h2>
<div className="space-y-3">
{solution.challenges.map((challenge, index) => (
<div
key={index}
className="flex items-start gap-3 p-4 rounded-lg border-l-4 border-[#C41E3A] bg-[#FAFAFA]"
>
<span className="text-[#1C1C1C] text-sm">{challenge}</span>
</div>
))}
</div>
</motion.section>
<motion.section
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: 0.1 }}
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 flex items-center gap-3">
<CheckCircle2 className="w-6 h-6 text-[#C41E3A]" />
</h2>
<div className="space-y-4">
{solution.solutions.map((sol, index) => (
<div key={index} className="flex items-start gap-4">
<div className="w-8 h-8 bg-[#C41E3A] rounded-full flex items-center justify-center shrink-0 text-white text-sm font-bold">
{index + 1}
</div>
<p className="text-[#1C1C1C] pt-1 leading-relaxed">{sol}</p>
</div>
))}
</div>
</motion.section>
{relatedProducts.length > 0 && (
<motion.section
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: 0.2 }}
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 flex items-center gap-3">
<Package className="w-6 h-6 text-[#C41E3A]" />
</h2>
<div className="grid md:grid-cols-2 gap-4">
{relatedProducts.map((product) => (
<StaticLink
key={product.id}
href={`/products/${product.id}`}
className="group block p-6 rounded-xl border border-[#E5E5E5] bg-white hover:border-[#C41E3A]/40 hover:shadow-lg transition-all duration-300"
>
<h3 className="text-lg font-semibold text-[#1C1C1C] mb-2 group-hover:text-[#C41E3A] transition-colors">
{product.title}
</h3>
<p className="text-sm text-[#595959] leading-relaxed">
{product.description}
</p>
</StaticLink>
))}
</div>
</motion.section>
)}
<div className="flex justify-center gap-4 pt-8 border-t border-[#E5E5E5]">
<Button variant="outline" size="lg" asChild>
<StaticLink href="/contact"></StaticLink>
</Button>
<Button size="lg" className="bg-[#C41E3A] hover:bg-[#A01830] text-white" asChild>
<StaticLink href="/contact">
<ArrowRight className="ml-2 w-4 h-4" />
</StaticLink>
</Button>
</div>
</div>
</div>
</div>
);
}
@@ -0,0 +1,38 @@
import { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { SOLUTIONS } from '@/lib/constants/solutions';
import { PRODUCTS } from '@/lib/constants/products';
import { SolutionDetailClient } from './client';
export async function generateStaticParams() {
return SOLUTIONS.map((solution) => ({
id: solution.id,
}));
}
export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise<Metadata> {
const { id } = await params;
const solution = SOLUTIONS.find((s) => s.id === id);
if (!solution) {
return { title: '解决方案未找到' };
}
return {
title: `${solution.title} - 睿新致远`,
description: solution.description,
};
}
export default async function SolutionDetailPage({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const solution = SOLUTIONS.find((s) => s.id === id);
if (!solution) {
notFound();
}
const relatedProducts = PRODUCTS.filter((p) => solution.relatedProducts.includes(p.id));
return <SolutionDetailClient solution={JSON.parse(JSON.stringify(solution))} relatedProducts={JSON.parse(JSON.stringify(relatedProducts))} />;
}
+9 -3
View File
@@ -5,6 +5,7 @@ import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { ArrowRight, Lightbulb, Cpu, Users, CheckCircle2 } from 'lucide-react';
import { MethodologySection } from '@/components/sections/methodology-section';
import { PageNav } from '@/components/layout/page-nav';
const modules = [
{
@@ -30,7 +31,7 @@ const modules = [
'您不必懂技术原理,只需要看见业务在增长。',
],
values: ['业务场景深度调研', '技术方案定制开发', '敏捷交付快速迭代'],
cta: '查看技术案例',
cta: '了解技术方案',
ctaVariant: 'outline' as const,
},
{
@@ -53,6 +54,7 @@ export default function SolutionsPage() {
<div className="min-h-screen bg-white">
<section className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '解决方案' }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
@@ -73,9 +75,12 @@ export default function SolutionsPage() {
<section className="pb-20">
<div className="container-wide">
<div className="max-w-6xl mx-auto space-y-8">
{modules.map((module, index) => (
{modules.map((module, index) => {
const anchorIds = ['consulting', 'tech', 'accompany'];
return (
<motion.section
key={index}
id={anchorIds[index]}
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
@@ -129,7 +134,8 @@ export default function SolutionsPage() {
</Button>
</div>
</motion.section>
))}
);
})}
</div>
</div>
</section>
+91 -77
View File
@@ -1,12 +1,10 @@
'use client';
import { motion } from 'framer-motion';
import { useInView } from 'framer-motion';
import { useRef } from 'react';
import { StaticLink } from '@/components/ui/static-link';
import { Button } from '@/components/ui/button';
import { PageHeader } from '@/components/ui/page-header';
import { Shield, Building2, Users, Code, Target, ArrowRight } from 'lucide-react';
import { PageNav } from '@/components/layout/page-nav';
const TEAM_PILLARS = [
{
@@ -37,89 +35,105 @@ const TEAM_PILLARS = [
];
export function TeamClient() {
const contentRef = useRef(null);
const isContentInView = useInView(contentRef, { once: true, margin: '-100px' });
return (
<div className="min-h-screen bg-white">
<PageHeader
title="核心团队"
description="核心团队从事技术咨询、企业数字化等行业 12 年+,开发团队成员来自于多个大型传统 IT 企业"
/>
<div ref={contentRef} className="container-wide py-12 md:py-16">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6 }}
className="max-w-5xl mx-auto"
>
{/* 团队概述 */}
<section className="pt-32 pb-16">
<div className="container-wide">
<PageNav items={[{ label: '核心团队' }]} />
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.1 }}
className="bg-[#FFFBF5] rounded-2xl p-8 md:p-12 border border-[#E5E5E5] mb-16"
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
className="max-w-3xl"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="space-y-4 max-w-3xl mx-auto text-center">
<p className="text-[#5C5C5C] leading-relaxed">
<span className="text-[#C41E3A] font-medium"></span><span className="text-[#C41E3A] font-medium"></span> 12
</p>
<p className="text-[#5C5C5C] leading-relaxed">
<span className="text-[#C41E3A] font-medium"> IT </span>
</p>
<p className="text-[#5C5C5C] leading-relaxed">
</p>
</div>
<p className="text-sm font-medium text-[#C41E3A] mb-4 tracking-wide uppercase">Team</p>
<h1 className="text-4xl md:text-5xl font-bold text-[#1C1C1C] mb-6 tracking-tight">
</h1>
<p className="text-lg text-[#595959] leading-relaxed">
12 + IT
</p>
</motion.div>
</div>
</section>
{/* 团队优势 */}
<div className="mb-16">
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-8 text-center"></h2>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{TEAM_PILLARS.map((item, idx) => {
const Icon = item.icon;
return (
<motion.div
key={item.title}
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.5, delay: 0.2 + idx * 0.1 }}
className={idx >= 3 ? 'md:col-span-1 lg:col-start-1' : ''}
>
<div className="bg-white rounded-xl p-6 border border-[#E5E5E5] hover:border-[#C41E3A]/30 hover:shadow-md transition-all duration-300 h-full">
<div className="w-12 h-12 bg-[#C41E3A] rounded-xl flex items-center justify-center mb-4">
<Icon className="w-6 h-6 text-white" />
<section className="pb-16">
<div className="container-wide">
<div className="max-w-5xl mx-auto space-y-8">
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="p-8 rounded-xl border border-[#E5E5E5]"
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-6 text-center"></h2>
<div className="space-y-4 max-w-3xl mx-auto text-center">
<p className="text-[#595959] leading-relaxed">
<span className="text-[#C41E3A] font-medium"></span><span className="text-[#C41E3A] font-medium"></span> 12
</p>
<p className="text-[#595959] leading-relaxed">
<span className="text-[#C41E3A] font-medium"> IT </span>
</p>
<p className="text-[#595959] leading-relaxed">
</p>
</div>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
>
<h2 className="text-2xl font-bold text-[#1C1C1C] mb-8 text-center"></h2>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{TEAM_PILLARS.map((item, idx) => {
const Icon = item.icon;
return (
<motion.div
key={item.title}
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5, delay: idx * 0.1 }}
className={idx >= 3 ? 'md:col-span-1 lg:col-start-1' : ''}
>
<div className="flex items-start gap-4 p-6 rounded-xl border border-[#E5E5E5] hover:border-[#C41E3A]/30 transition-colors h-full">
<div className="w-10 h-10 rounded-lg bg-[#FEF2F4] flex items-center justify-center shrink-0">
<Icon className="w-5 h-5 text-[#C41E3A]" />
</div>
<div>
<h3 className="font-semibold text-[#1C1C1C] mb-1">{item.title}</h3>
<p className="text-sm text-[#595959]">{item.description}</p>
</div>
</div>
<h3 className="text-lg font-bold text-[#1C1C1C] mb-2">{item.title}</h3>
<p className="text-sm text-[#5C5C5C] leading-relaxed">{item.description}</p>
</div>
</motion.div>
);
})}
</div>
</div>
</motion.div>
);
})}
</div>
</motion.div>
{/* CTA */}
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isContentInView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.5 }}
className="text-center"
>
<p className="text-lg text-[#5C5C5C] mb-6"></p>
<Button size="lg" asChild>
<StaticLink href="/contact">
<ArrowRight className="ml-2 w-4 h-4" />
</StaticLink>
</Button>
</motion.div>
</motion.div>
</div>
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ duration: 0.5 }}
className="text-center pt-8"
>
<p className="text-lg text-[#595959] mb-6"></p>
<Button size="lg" className="bg-[#C41E3A] hover:bg-[#A01830] text-white" asChild>
<StaticLink href="/contact">
<ArrowRight className="ml-2 w-4 h-4" />
</StaticLink>
</Button>
</motion.div>
</div>
</div>
</section>
</div>
);
}
+1 -1
View File
@@ -98,7 +98,7 @@ export default function Error({
<RefreshCw className="w-5 h-5 text-[#C41E3A]" />
</div>
<div className="text-left">
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="text-sm text-[#5C5C5C]"></div>
</div>
</StaticLink>
+50
View File
@@ -1164,6 +1164,56 @@ body {
}
}
/* 墨韵流光 - 旋转渐变边框 */
@property --border-angle {
syntax: '<angle>';
initial-value: 0deg;
inherits: false;
}
@keyframes rotateBorder {
from { --border-angle: 0deg; }
to { --border-angle: 360deg; }
}
.ink-glow-border {
animation: rotateBorder 4s linear infinite;
}
.ink-glow-border::before {
content: '';
position: absolute;
inset: -1px;
border-radius: inherit;
padding: 1px;
background: conic-gradient(from var(--border-angle), var(--glow-start), var(--glow-end), var(--glow-start));
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
opacity: 0;
transition: opacity 0.5s ease;
}
.ink-glow-border:hover::before {
opacity: 1;
}
.ink-glow-border::after {
content: '';
position: absolute;
inset: -4px;
border-radius: inherit;
background: conic-gradient(from var(--border-angle), var(--glow-start), var(--glow-end), var(--glow-start));
filter: blur(12px);
opacity: 0;
transition: opacity 0.5s ease;
z-index: -1;
}
.ink-glow-border:hover::after {
opacity: 0.3;
}
/* 平板端优化 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
.container-wide,
+5 -5
View File
@@ -74,7 +74,7 @@ export default function NotFound() {
<Search className="w-5 h-5 text-[#C41E3A]" />
</div>
<div className="text-left">
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="text-sm text-[#5C5C5C]"></div>
</div>
</StaticLink>
@@ -87,21 +87,21 @@ export default function NotFound() {
<Search className="w-5 h-5 text-[#C41E3A]" />
</div>
<div className="text-left">
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="text-sm text-[#5C5C5C]"></div>
</div>
</StaticLink>
<StaticLink
href="/cases"
href="/solutions"
className="flex items-center p-4 bg-white rounded-lg hover:shadow-md transition-shadow group"
>
<div className="w-10 h-10 bg-[#C41E3A]/10 rounded-lg flex items-center justify-center mr-4 group-hover:bg-[#C41E3A]/20 transition-colors">
<Search className="w-5 h-5 text-[#C41E3A]" />
</div>
<div className="text-left">
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="text-sm text-[#5C5C5C]"></div>
<div className="font-semibold text-[#1C1C1C]"></div>
<div className="text-sm text-[#5C5C5C]"></div>
</div>
</StaticLink>
</div>