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
+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>
);
}