2024-03-27 00:49:10 +00:00
|
|
|
import Navigation from './nav'
|
|
|
|
import NavFooter from './nav/mobile/footer'
|
|
|
|
import NavStatic from './nav/static'
|
2021-04-14 23:56:29 +00:00
|
|
|
import Container from 'react-bootstrap/Container'
|
2021-06-02 23:15:28 +00:00
|
|
|
import Footer from './footer'
|
2023-07-23 15:08:43 +00:00
|
|
|
import Seo, { SeoSearch } from './seo'
|
2022-01-26 21:43:18 +00:00
|
|
|
import Search from './search'
|
2023-07-23 15:08:43 +00:00
|
|
|
import styles from './layout.module.css'
|
2021-04-12 18:05:09 +00:00
|
|
|
|
2022-02-17 17:23:43 +00:00
|
|
|
export default function Layout ({
|
2023-07-23 15:08:43 +00:00
|
|
|
sub, contain = true, footer = true, footerLinks = true,
|
|
|
|
containClassName = '', seo = true, item, user, children
|
2022-02-17 17:23:43 +00:00
|
|
|
}) {
|
2021-04-12 18:05:09 +00:00
|
|
|
return (
|
|
|
|
<>
|
2023-07-23 15:08:43 +00:00
|
|
|
{seo && <Seo sub={sub} item={item} user={user} />}
|
2024-02-23 15:32:20 +00:00
|
|
|
<Navigation sub={sub} />
|
2023-07-23 15:08:43 +00:00
|
|
|
{contain
|
|
|
|
? (
|
2024-02-23 15:32:20 +00:00
|
|
|
<Container as='main' className={`px-sm-0 ${styles.contain}`}>
|
2023-07-23 15:08:43 +00:00
|
|
|
{children}
|
|
|
|
</Container>
|
|
|
|
)
|
|
|
|
: children}
|
|
|
|
{footer && <Footer links={footerLinks} />}
|
2024-02-23 15:32:20 +00:00
|
|
|
<NavFooter sub={sub} />
|
2021-04-12 18:05:09 +00:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
2023-07-23 15:08:43 +00:00
|
|
|
|
|
|
|
export function SearchLayout ({ sub, children, ...props }) {
|
|
|
|
return (
|
2024-02-23 15:32:20 +00:00
|
|
|
<Layout sub={sub} seo={false} footer={false} {...props}>
|
2023-07-23 15:08:43 +00:00
|
|
|
<SeoSearch sub={sub} />
|
2023-09-11 23:11:47 +00:00
|
|
|
<Search sub={sub} />
|
2024-02-23 15:32:20 +00:00
|
|
|
{children}
|
2023-07-23 15:08:43 +00:00
|
|
|
</Layout>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2024-02-23 15:32:20 +00:00
|
|
|
export function StaticLayout ({ children, footer = true, footerLinks = false, ...props }) {
|
2023-07-23 15:08:43 +00:00
|
|
|
return (
|
2024-02-23 15:32:20 +00:00
|
|
|
<>
|
|
|
|
<NavStatic />
|
|
|
|
<div className={styles.page}>
|
|
|
|
<main className={`${styles.content} ${styles.contain} py-3`}>
|
|
|
|
{children}
|
|
|
|
</main>
|
|
|
|
</div>
|
2023-07-23 15:08:43 +00:00
|
|
|
{footer && <Footer links={footerLinks} />}
|
2024-02-23 15:32:20 +00:00
|
|
|
<NavFooter />
|
|
|
|
</>
|
2023-07-23 15:08:43 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function CenterLayout ({ children, ...props }) {
|
|
|
|
return (
|
2024-02-23 15:32:20 +00:00
|
|
|
<Layout contain={false} footer={false} {...props}>
|
|
|
|
<div className={styles.page}>
|
2023-07-23 15:08:43 +00:00
|
|
|
<main className={styles.content}>
|
|
|
|
{children}
|
|
|
|
</main>
|
2024-02-23 15:32:20 +00:00
|
|
|
</div>
|
|
|
|
</Layout>
|
2023-07-23 15:08:43 +00:00
|
|
|
)
|
|
|
|
}
|