2023-07-20 08:42:56 +02:00
|
|
|
// Dependencies
|
|
|
|
import { NavigationContext } from 'shared/context/navigation-context.mjs'
|
2023-07-15 12:32:17 +02:00
|
|
|
// Hooks
|
2023-07-20 08:42:56 +02:00
|
|
|
import { useContext } from 'react'
|
2023-07-15 12:32:17 +02:00
|
|
|
// Components
|
2023-07-21 14:22:46 +02:00
|
|
|
import { SectionsMenu, ns as sectionsNs } from 'shared/components/navigation/sections-menu.mjs'
|
2023-05-16 10:34:13 +02:00
|
|
|
import { ModalWrapper } from 'shared/components/wrappers/modal.mjs'
|
2023-05-22 19:53:24 +02:00
|
|
|
import { nsMerge } from 'shared/utils.mjs'
|
|
|
|
import { ChoiceLink } from 'shared/components/choice-link.mjs'
|
2023-07-16 07:27:51 +02:00
|
|
|
import { NavLinks, Breadcrumbs } from 'shared/components/navigation/sitenav.mjs'
|
2023-05-16 10:34:13 +02:00
|
|
|
|
2023-07-15 12:32:17 +02:00
|
|
|
export const ns = nsMerge(sectionsNs)
|
|
|
|
|
2023-07-16 08:25:08 +02:00
|
|
|
export const ModalMenu = ({ slug }) => {
|
2023-07-20 08:42:56 +02:00
|
|
|
// Grab siteNav from the navigation context
|
|
|
|
const { siteNav } = useContext(NavigationContext)
|
2023-07-15 12:32:17 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<ModalWrapper flex="col" justify="top" slideFrom="left">
|
|
|
|
<div className="max-w-full">
|
|
|
|
<div
|
|
|
|
className={`
|
|
|
|
py-4 w-full m-auto
|
|
|
|
flex flex-col-reverse gap-0 flex-wrap justify-between
|
|
|
|
lg:max-w-6xl lg:flex-nowrap lg:gap-8 lg:flex-row
|
|
|
|
`}
|
|
|
|
>
|
|
|
|
<div className="w-full lg:w-1/2">
|
|
|
|
<SectionsMenu />
|
|
|
|
<ChoiceLink href="/search" title="Search">
|
|
|
|
If you cannot find what you are looking for but you know the key words, try our
|
|
|
|
search.
|
|
|
|
</ChoiceLink>
|
|
|
|
<ChoiceLink href="/sitemap" title="Sitemap">
|
|
|
|
The sitemap lists all pages on this website. It can give you a good idea of what you
|
|
|
|
can find here.
|
|
|
|
</ChoiceLink>
|
|
|
|
</div>
|
|
|
|
<div className="w-full lg:w-1/2">
|
2023-07-16 09:51:06 +02:00
|
|
|
<Breadcrumbs {...{ siteNav, slug }} lead />
|
2023-07-15 12:32:17 +02:00
|
|
|
<NavLinks {...{ siteNav, slug }} />
|
|
|
|
</div>
|
2023-05-16 10:34:13 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-15 12:32:17 +02:00
|
|
|
</ModalWrapper>
|
|
|
|
)
|
|
|
|
}
|