import { BackButton } from './BackButton'; import { LogoutButton } from './LogoutButton'; import MobileBottomNav from './MobileBottomNav'; import MobileHeader from './MobileHeader'; import { SettingsButton } from './SettingsButton'; import Sidebar from './Sidebar'; import { ThemeToggle } from './ThemeToggle'; interface PageLayoutProps { children: React.ReactNode; activePath?: string; } const PageLayout = ({ children, activePath = '/' }: PageLayoutProps) => { return (
{/* 移动端头部 */} {/* 主要布局容器 */}
{/* 侧边栏 - 桌面端显示,移动端隐藏 */}
{/* 主内容区域 */}
{/* 桌面端左上角返回按钮 */} {['/play'].includes(activePath) && (
)} {/* 桌面端顶部按钮 */}
{/* 主内容 */}
{children}
{/* 移动端底部导航 */}
); }; export default PageLayout;