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