Skip to content

Commit

Permalink
chore: prefix navigation with section
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3m01 committed Oct 29, 2024
1 parent 8fb7c96 commit a241eee
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
20 changes: 8 additions & 12 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ export default defineConfig(
title: "Qu'est-ce que SolidBase ?",
link: "/about",
},
{
title: "Que nous manque-t-il ?",
link: "/dave",
},
],
},
{
Expand Down Expand Up @@ -132,6 +128,10 @@ export default defineConfig(
title: "What is SolidBase?",
link: "/about",
},
{
title: "Getting Started",
link: "/getting-started",
},
{
title: "What are we missing?",
link: "/dave",
Expand All @@ -144,23 +144,19 @@ export default defineConfig(
items: [
{
title: "MDX",
link: "/about",
},
{
title: "Code copy",
link: "/about",
link: "/md-extensions",
},
{
title: "Good styles",
link: "/about",
link: "/customization",
},
{
title: "Cool team 8)",
link: "/about",
},
{
title: "CLI",
link: "/about",
title: "Dev",
link: "/dev",
},
],
},
Expand Down
7 changes: 7 additions & 0 deletions docs/src/routes/[...404].mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 404

:::danger[_]
No page here
:::

Return [Home](/).
7 changes: 7 additions & 0 deletions docs/src/routes/fr/[...404].mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 404

:::danger[_]
Aucune page ici
:::

Returner à la [Page d'Accueil](/).
1 change: 1 addition & 0 deletions src/default-theme/Layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
.sidenav-links {
width: 100%;
color: var(--text-color);
padding: 1rem 0;

& ul {
list-style-type: none;
Expand Down
4 changes: 2 additions & 2 deletions src/default-theme/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function Layout(props: RouteSectionProps) {
}

interface NavigationProps {
sidebar: Sidebar;
sidebar: Sidebar & { prefix: string };
}
const Navigation = (props: NavigationProps) => {
const { locale } = useSolidBaseContext();
Expand All @@ -133,7 +133,7 @@ const Navigation = (props: NavigationProps) => {
class={`${styles["sidenav-link"]}`}
activeClass={styles.active}
href={locale.applyPathPrefix(
(item as { link: string }).link,
`${props.sidebar.prefix}${(item as { link: string }).link}`,
)}
end
onClick={() => setSidebarOpen(false)}
Expand Down

0 comments on commit a241eee

Please sign in to comment.