mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-18 08:26:35 +00:00
fix mobile view
This commit is contained in:
@@ -158,8 +158,8 @@ export function Layout({ children, title, tableOfContents }) {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Header />
|
<Header />
|
||||||
{router.route.startsWith("/ipa") && <NavigationAPI tableOfContents={tableOfContents} className="hidden lg:mt-10 lg:block" />}
|
{router.route.startsWith("/ipa") && <NavigationAPI className="hidden lg:mt-10 lg:block" tableOfContents={tableOfContents} />}
|
||||||
{router.route.startsWith("/docs") &&<NavigationDocs className="hidden lg:mt-10 lg:block" />}
|
{router.route.startsWith("/docs") && <NavigationDocs className="hidden lg:mt-10 lg:block" />}
|
||||||
</div>
|
</div>
|
||||||
</motion.header>
|
</motion.header>
|
||||||
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
|
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ export const apiNavigation = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export function NavigationAPI(props) {
|
export function NavigationAPI({tableOfContents, className}) {
|
||||||
return (
|
return (
|
||||||
<nav {...props}>
|
<nav className={className}>
|
||||||
<ul role="list">
|
<ul role="list">
|
||||||
<TopLevelNavItem href="https://netbird.io/">Home</TopLevelNavItem>
|
<TopLevelNavItem href="https://netbird.io/">Home</TopLevelNavItem>
|
||||||
<TopLevelNavItem href="/docs/introductions">Docs</TopLevelNavItem>
|
<TopLevelNavItem href="/docs/introductions">Docs</TopLevelNavItem>
|
||||||
@@ -49,7 +49,7 @@ export function NavigationAPI(props) {
|
|||||||
<NavigationGroup
|
<NavigationGroup
|
||||||
key={group.title}
|
key={group.title}
|
||||||
group={group}
|
group={group}
|
||||||
tableOfContents={props.tableOfContents}
|
tableOfContents={tableOfContents}
|
||||||
className={groupIndex === 0 && 'md:mt-0'}
|
className={groupIndex === 0 && 'md:mt-0'}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
@@ -183,7 +183,7 @@ function NavigationGroup({ group, className, tableOfContents }) {
|
|||||||
transition: { duration: 0.15 },
|
transition: { duration: 0.15 },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{router.route.startsWith("/ipa/resources") && tableOfContents.tableOfContents?.map((section) => (
|
{router.route.startsWith("/ipa/resources") && tableOfContents?.map((section) => (
|
||||||
<li key={section.id}>
|
<li key={section.id}>
|
||||||
<NavLink
|
<NavLink
|
||||||
href={`${link.href}#${section.id}`}
|
href={`${link.href}#${section.id}`}
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ export const docsNavigation = [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export function NavigationDocs(props) {
|
export function NavigationDocs({className}) {
|
||||||
return (
|
return (
|
||||||
<nav {...props}>
|
<nav className={className}>
|
||||||
<ul role="list">
|
<ul role="list">
|
||||||
<TopLevelNavItem href="https://netbird.io/">Home</TopLevelNavItem>
|
<TopLevelNavItem href="https://netbird.io/">Home</TopLevelNavItem>
|
||||||
<TopLevelNavItem href="/docs/introductions">Docs</TopLevelNavItem>
|
<TopLevelNavItem href="/docs/introductions">Docs</TopLevelNavItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user