diff --git a/src/app/globals.css b/src/app/globals.css index f392303..0c40c5c 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -220,7 +220,7 @@ a { --bs-alert-border-color: #205a38; } -/* ── App-Shell / Seitenleiste (nur auf der Projektseite) ────────────────── */ +/* ── App-Shell / Seitenleiste (alle Seiten außer der Seitenansicht) ──── */ .app-shell { display: grid; diff --git a/src/frontend/components/AppShell.tsx b/src/frontend/components/AppShell.tsx index bbfa0ae..77b7c78 100644 --- a/src/frontend/components/AppShell.tsx +++ b/src/frontend/components/AppShell.tsx @@ -4,12 +4,14 @@ import { useEffect, useState } from "react"; import { usePathname } from "next/navigation"; import { Sidebar } from "./Sidebar"; -const PROJECT_AREA_PATTERN = /^\/projects(\/[^/]+)?$/; +// Every page shows the (collapsible) sidebar except the print view, which is +// a stand-alone document opened in its own tab and printed as PDF. +const PRINT_VIEW_PATTERN = /^\/projects\/[^/]+\/print(\/|$)/; const SIDEBAR_COLLAPSED_STORAGE_KEY = "leistungsbilanz:sidebar-collapsed"; export function AppShell({ children }: { children: React.ReactNode }) { const pathname = usePathname(); - const showSidebar = PROJECT_AREA_PATTERN.test(pathname ?? ""); + const showSidebar = !PRINT_VIEW_PATTERN.test(pathname ?? ""); const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false); useEffect(() => {