glam/frontend/src/components/layout/Layout.tsx
2025-12-01 16:06:34 +01:00

61 lines
1.9 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 { useLanguage } from '../../contexts/LanguageContext';
import './Layout.css';
// Pages that handle their own footer (full-screen apps with sidebars)
const PAGES_WITH_CUSTOM_FOOTER = ['/map', '/visualize', '/query-builder', '/linkml', '/ontology'];
export function Layout() {
const currentYear = new Date().getFullYear();
const { t } = useLanguage();
const location = useLocation();
// Hide global footer on pages that have their own minimal footer
const showGlobalFooter = !PAGES_WITH_CUSTOM_FOOTER.includes(location.pathname);
return (
<div className="layout">
<Navigation />
<div className="layout-content">
<div className="layout-main">
<Outlet />
</div>
{/* Footer - appears at the bottom of pages without custom footers */}
{showGlobalFooter && (
<footer className="layout-footer">
<div className="footer-content">
<div className="footer-copyright">
© {currentYear}{' '}
<a
href="https://netwerkdigitaalerfgoed.nl/"
target="_blank"
rel="noopener noreferrer"
className="footer-link"
>
Netwerk Digitaal Erfgoed
</a>
{' & '}
<a
href="https://www.textpast.com/"
target="_blank"
rel="noopener noreferrer"
className="footer-link"
>
TextPast
</a>
. {t('Alle rechten voorbehouden.', 'All rights reserved.')}
</div>
</div>
</footer>
)}
</div>
</div>
);
}