24 lines
660 B
Text
24 lines
660 B
Text
---
|
|
import SidebarWrapper from "./SidebarWrapper.tsx";
|
|
import RootNav from "./RootNav.astro";
|
|
|
|
const url = Astro.url.pathname.split("/");
|
|
const currentRoute = url[2];
|
|
const currentModule = url[3];
|
|
const currentClass = url[4];
|
|
|
|
export interface Props {
|
|
mobile: boolean;
|
|
}
|
|
|
|
const { mobile } = Astro.props;
|
|
---
|
|
<aside class=`nav-wrapper${mobile ? "-mobile" : ""}`>
|
|
{ mobile ? (
|
|
<SidebarWrapper client:load>
|
|
<RootNav currentRoute={currentRoute} currentModule={currentModule} currentClass={currentClass}/>
|
|
</SidebarWrapper>
|
|
) : (
|
|
<RootNav currentRoute={currentRoute} currentModule={currentModule} currentClass={currentClass}/>
|
|
)}
|
|
</aside>
|