统一移动端所有一级页面顶部显示,采用HeaderLogo组件实现品牌一致性。
✅ NewHomePage.tsx - 已正确使用HeaderLogo组件
import HeaderLogo from '../components/HeaderLogo';
// 使用位置:第334行
<HeaderLogo className="flex-1" />
interface HeaderLogoProps {
className?: string;
logoSize?: 'sm' | 'md' | 'lg'; // 默认: 'md'
showName?: boolean; // 默认: true
}
import HeaderLogo from '@/client/mobile/components/HeaderLogo';
md(默认)<header className="sticky top-0 z-10 shadow-sm border-b px-4 py-4"
style={{ backgroundColor: 'rgba(255,255,255,0.8)', borderColor: INK_COLORS.ink.medium }}>
<div className="flex items-center justify-between">
<HeaderLogo />
{/* 右侧操作按钮区域 */}
<div className="flex items-center space-x-2">
{/* 搜索、设置等按钮 */}
</div>
</div>
</header>
- import { INK_COLORS } from '@/client/mobile/styles/colors';
+ import HeaderLogo from '@/client/mobile/components/HeaderLogo';
+ import { INK_COLORS } from '@/client/mobile/styles/colors';
- <div>
- <h1 className="font-serif text-xl font-bold" style={{ color: INK_COLORS.ink.deep }}>银龄岗位</h1>
- <p className="text-xs mt-1" style={{ color: INK_COLORS.text.secondary }}>发现适合银龄人才的优质岗位</p>
- </div>
+ <HeaderLogo />
- <h1 className="font-serif text-2xl font-bold tracking-wide"
- style={{ color: COLORS.text.primary }}>
- 银龄人才库
- </h1>
+ <HeaderLogo />
统一使用HeaderLogo组件,移除自定义标题文本。
// 标准头部组件
const PageHeader: React.FC<{ children?: React.ReactNode }> = ({ children }) => (
<header className="sticky top-0 z-10 shadow-sm border-b px-4 py-4"
style={{ backgroundColor: 'rgba(255,255,255,0.8)', borderColor: INK_COLORS.ink.medium }}>
<div className="flex items-center justify-between">
<HeaderLogo />
{children}
</div>
</header>
);
// 使用方式
<PageHeader>
<div className="flex items-center space-x-2">
<SearchButton />
<SettingsButton />
</div>
</PageHeader>