/** * 报头组件(前台共用)。 * * 此前 HomePage 与 StandingsLayout 各自复制一份报头,导航项已经漂移 * (首页有「积分榜」、积分榜页有「比赛/预测」),且无当前页高亮。 * 现在统一为 Masthead: * - active 声明当前版面,对应导航项加印报红高亮 + aria-current * - 「管理」入口改用与全站一致的线条 SVG(替代字符 ⚙) * - 管理类入口带 title 提示,避免访客被无声踢到登录页 * 页脚文案各页不同,仍由调用方自行渲染。 */ import { Link } from 'react-router-dom' export type MastheadActive = 'home' | 'standings' function GearIcon() { return ( ) } function MastheadLink({ to, active = false, title, children, }: { to: string /** 当前版面才高亮;管理类入口无高亮概念 */ active?: boolean title?: string children: React.ReactNode }) { return ( {children} ) } export default function Masthead({ active }: { active: MastheadActive }) { return (

先知

{new Date().toLocaleDateString('zh-CN', { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' })}
) }