glam/frontend/src/components/layout/Layout.tsx
2025-12-01 00:37:24 +01:00

39 lines
1.2 KiB
TypeScript

/**
* Root Layout Component
*
* © 2025 Netwerk Digitaal Erfgoed & TextPast. All rights reserved.
*/
import { Outlet, useLocation } from 'react-router-dom';
import { Navigation } from './Navigation';
import './Layout.css';
// Pages that should hide the footer completely
const FULLSCREEN_PAGES = ['/visualize', '/map', '/database', '/query-builder', '/linkml', '/ontology', '/stats'];
export function Layout() {
const location = useLocation();
const currentYear = new Date().getFullYear();
// Check if current page is a full-screen page - hide footer on these
const isFullscreenPage = FULLSCREEN_PAGES.includes(location.pathname);
return (
<div className="layout">
<Navigation />
<div className="layout-content">
<Outlet />
{/* Minimal footer - only shows on pages with scrollable content */}
{!isFullscreenPage && (
<footer className="layout-footer">
<div className="footer-content">
<div className="footer-copyright">
© {currentYear} Netwerk Digitaal Erfgoed & TextPast. All rights reserved.
</div>
</div>
</footer>
)}
</div>
</div>
);
}