initial commit
This commit is contained in:
commit
3c2fb32b3e
73 changed files with 22349 additions and 0 deletions
31
src/components/navigation/sidebars/Nav.astro
Normal file
31
src/components/navigation/sidebars/Nav.astro
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
import { generateTypeData } from "@config/io/generateTypeData";
|
||||
import { groupRoutes } from "@config/io/helpers";
|
||||
import NavComponent from "./nav";
|
||||
|
||||
const routes = await generateTypeData();
|
||||
const groupedRoutes = groupRoutes(routes);
|
||||
|
||||
const url = Astro.url.pathname.split("/");
|
||||
const currentRoute = url[2];
|
||||
const currentModule = url[3];
|
||||
const currentClass = url[4];
|
||||
|
||||
const treeProps = {
|
||||
items: groupedRoutes,
|
||||
currentRoute: currentRoute,
|
||||
currentModule: currentModule,
|
||||
currentClass: currentClass,
|
||||
};
|
||||
|
||||
const { mobile } = Astro.props;
|
||||
---
|
||||
|
||||
<aside class=`nav-wrapper${mobile ? "-mobile" : ""}`>
|
||||
<NavComponent
|
||||
routes={groupedRoutes}
|
||||
tree={treeProps}
|
||||
mobile={mobile}
|
||||
client:idle
|
||||
/>
|
||||
</aside>
|
||||
Loading…
Add table
Add a link
Reference in a new issue