Files
Homarr/src/components/layout/Layout.tsx

32 lines
824 B
TypeScript
Raw Normal View History

2022-06-07 00:30:42 +02:00
import { AppShell, createStyles } from '@mantine/core';
2022-12-04 17:36:30 +01:00
import { useConfigContext } from '../../config/provider';
import { Background } from './Background';
2022-12-04 17:36:30 +01:00
import { Footer } from './Footer';
import { Header } from './Header/Header';
2022-12-06 21:33:12 +01:00
import { Head } from './Header/Meta/Head';
2022-04-25 00:11:32 +02:00
2022-12-04 17:36:30 +01:00
const useStyles = createStyles(() => ({}));
2022-04-25 00:11:32 +02:00
2022-12-04 17:36:30 +01:00
export default function Layout({ children }: any) {
const { cx } = useStyles();
const { config } = useConfigContext();
2022-06-12 08:04:20 +02:00
2022-04-25 00:11:32 +02:00
return (
2022-06-12 08:04:20 +02:00
<AppShell
fixed={false}
2022-06-12 08:04:20 +02:00
header={<Header />}
footer={<Footer links={[]} />}
2022-12-04 17:36:30 +01:00
styles={{
main: {
minHeight: 'calc(100vh - var(--mantine-header-height))',
},
}}
2022-06-12 08:04:20 +02:00
>
2022-12-04 17:36:30 +01:00
<Head />
<Background />
2022-12-04 17:36:30 +01:00
{children}
<style>{cx(config?.settings.customization.customCss)}</style>
2022-04-25 00:11:32 +02:00
</AppShell>
);
}