/** * Forum Layout (CommunityLayout) * Wraps all forum pages with header, sidebar, main content area, and footer. * Header: logo, search, theme toggle, user menu placeholder. * @see specs/prd-web.md Section 4 (Layout Components) */ import Link from 'next/link' import Image from 'next/image' import { SkipLinks } from '@/components/skip-links' import { ThemeToggle } from '@/components/theme-toggle' import { SearchInput } from '@/components/search-input' import { NotificationBell } from '@/components/notification-bell' import { UserMenu } from '@/components/auth/user-menu' import { MagnifyingGlass } from '@phosphor-icons/react/dist/ssr' import { NewTopicButton } from '@/components/new-topic-button' import type { PublicSettings } from '@/lib/api/types' interface ForumLayoutProps { children: React.ReactNode sidebar?: React.ReactNode publicSettings?: PublicSettings | null } export function ForumLayout({ children, sidebar, publicSettings }: ForumLayoutProps) { const communityName = publicSettings?.communityName ?? '' const headerLogoUrl = publicSettings?.headerLogoUrl ?? null const communityLogoUrl = publicSettings?.communityLogoUrl ?? null const showCommunityName = publicSettings?.showCommunityName ?? true return (
{/* Header */}
{/* Logo */} {headerLogoUrl ? ( {communityName ) : communityLogoUrl ? ( {communityName ) : ( <> Barazo Barazo )} {showCommunityName && communityName && ( {communityName} )} {/* Search */}
{/* Actions */}
{/* Mobile search */}
{/* Main layout */}
{/* Main content */}
{children}
{/* Sidebar */} {sidebar && ( )}
{/* Footer */}
) }