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';
|
2022-06-07 17:36:05 +00:00
|
|
|
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
|
2022-07-26 00:51:55 +02:00
|
|
|
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 />
|
2022-06-07 17:36:05 +00:00
|
|
|
<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>
|
|
|
|
|
);
|
|
|
|
|
}
|