diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 1cc1984d..d2b4e7b0 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -4,9 +4,7 @@ import { useRouter } from 'next/router' import clsx from 'clsx' import { Logo, Logomark } from '@/components/Logo' -import { MobileNavigation } from '@/components/MobileNavigation' import { Prose } from '@/components/Prose' -import { Search } from '@/components/Search' import {HeroPattern} from "@/components/HeroPattern"; import {NavigationDocs} from "@/components/NavigationDocs"; import {Header} from "@/components/Header"; @@ -160,8 +158,8 @@ export function Layout({ children, title, tableOfContents }) {
- {router.route.startsWith("/ipa") ? : - } + {router.route.startsWith("/ipa") && } + {router.route.startsWith("/docs") &&}
@@ -174,12 +172,12 @@ export function Layout({ children, title, tableOfContents }) { + ) } - export function TopLevelNavItem({ href, children }) { return (
  • @@ -88,15 +135,7 @@ export function ActivePageMarker({ group, pathname }) { } function NavigationGroup({ group, className, tableOfContents }) { - // If this is the mobile navigation then we always render the initial - // state, so that the state does not change during the close animation. - // The state will still update when we re-open (re-render) the navigation. - // let isInsideMobileNavigation = useIsInsideMobileNavigation() let router = useRouter() - // let [router, sections] = useInitialValue( - // [useRouter(), useSectionStore((s) => s.sections)], - // isInsideMobileNavigation - // ) let isActiveGroup = group.links.findIndex((link) => link.href === router.pathname) !== -1 @@ -111,10 +150,10 @@ function NavigationGroup({ group, className, tableOfContents }) {
    - {isActiveGroup && ( - - )} - + {isActiveGroup && ( + + )} + - {router.route.startsWith("/ipa/resources") && tableOfContents.tableOfContents.map((section) => ( + {router.route.startsWith("/ipa/resources") && tableOfContents.tableOfContents?.map((section) => (
  • -
      - Home - Docs - API - Blog - Github - Support - { - apiNavigation.map((group, groupIndex) => ( - - )) - } -
    • - -
    • -
    - - ) -} + diff --git a/src/components/NavigationDocs.jsx b/src/components/NavigationDocs.jsx index cb6e921e..863e9068 100644 --- a/src/components/NavigationDocs.jsx +++ b/src/components/NavigationDocs.jsx @@ -2,6 +2,7 @@ import { useRouter } from 'next/router' import clsx from 'clsx' import {ActivePageMarker, NavLink, TopLevelNavItem, VisibleSectionHighlight} from "@/components/NavigationAPI"; import {AnimatePresence, motion} from "framer-motion"; +import {Button} from "@/components/mdx"; export const docsNavigation = [ { @@ -18,10 +19,10 @@ export const docsNavigation = [ title: 'How-to', links: [ { title: 'Getting Started', href: '/docs/how-to/getting-started' }, - { title: 'Setup Keys', href: '/docs/how-to/setup-keys' }, - { title: 'Access Control', href: '/docs/how-to/access-control' }, - { title: 'Users', href: '/docs/how-to/users' }, - { title: 'Add users to your network', href: '/docs/how-to/add-users-to-you-network' }, + { title: 'Register peers using setup keys', href: '/docs/how-to/register-peers-using-setup-keys' }, + { title: 'Restrict access to peers', href: '/docs/how-to/restrict-access-to-peers' }, + { title: 'Add Users to your network', href: '/docs/how-to/add-users-to-you-network' }, + { title: 'Use service users with access token', href: '/docs/how-to/use-service-users-with-access-token' }, { title: 'Configure periodic user authentication', href: '/docs/how-to/configure-periodic-user-authentication' }, { title: 'Monitor system and network activity', href: '/docs/how-to/monitor-system-and-network-activity' }, { title: 'Routing traffic to private networks', href: '/docs/how-to/routing-traffic-to-private-networks' }, @@ -56,21 +57,22 @@ export function NavigationDocs(props) { className={groupIndex === 0 && 'md:mt-0'} /> ))} +
  • + +
  • ) } function NavigationGroup({ group, className }) { - // If this is the mobile navigation then we always render the initial - // state, so that the state does not change during the close animation. - // The state will still update when we re-open (re-render) the navigation. let router = useRouter() let isActiveGroup = group.links.findIndex((link) => link.href === router.pathname) !== -1 - return (