mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-20 17:36:36 +00:00
Adjust layout
This commit is contained in:
@@ -146,7 +146,7 @@ export function Layout({ children, title, tableOfContents }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<HeroPattern/>
|
<HeroPattern/>
|
||||||
<div className="relative mx-auto flex max-w-8xl justify-center sm:px-2 lg:px-8 xl:px-12 lg:ml-72 xl:ml-80">
|
<div className="relative mx-auto flex max-w-8xl sm:px-2 lg:px-8 xl:px-12 lg:ml-72 xl:ml-80">
|
||||||
<motion.header
|
<motion.header
|
||||||
layoutScroll
|
layoutScroll
|
||||||
className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"
|
className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"
|
||||||
@@ -168,7 +168,7 @@ export function Layout({ children, title, tableOfContents }) {
|
|||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
{!router.route.startsWith("/ipa/resources") && !router.route.includes("introduction") && <div className="hidden xl:sticky xl:top-[4.5rem] xl:-mr-6 xl:block xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6">
|
{!router.route.startsWith("/ipa/resources") && <div className="hidden xl:sticky xl:top-[4.5rem] xl:-mr-6 xl:block xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6">
|
||||||
<nav aria-labelledby="on-this-page-title" className="w-56">
|
<nav aria-labelledby="on-this-page-title" className="w-56">
|
||||||
{tableOfContents.length > 0 && (
|
{tableOfContents.length > 0 && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ function NavigationGroup({ group, className }) {
|
|||||||
<li className={clsx('relative mt-6', className)}>
|
<li className={clsx('relative mt-6', className)}>
|
||||||
<motion.h2
|
<motion.h2
|
||||||
layout="position"
|
layout="position"
|
||||||
className="text-xs font-semibold text-zinc-900 dark:text-white"
|
className="text-s font-semibold text-zinc-900 dark:text-white"
|
||||||
>
|
>
|
||||||
{group.title}
|
{group.title}
|
||||||
</motion.h2>
|
</motion.h2>
|
||||||
@@ -104,34 +104,6 @@ function NavigationGroup({ group, className }) {
|
|||||||
<NavLink href={link.href} active={link.href === router.pathname}>
|
<NavLink href={link.href} active={link.href === router.pathname}>
|
||||||
{link.title}
|
{link.title}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
{/*<AnimatePresence mode="popLayout" initial={false}>*/}
|
|
||||||
{/* {link.href === router.pathname && sections.length > 0 && (*/}
|
|
||||||
{/* <motion.ul*/}
|
|
||||||
{/* role="list"*/}
|
|
||||||
{/* initial={{ opacity: 0 }}*/}
|
|
||||||
{/* animate={{*/}
|
|
||||||
{/* opacity: 1,*/}
|
|
||||||
{/* transition: { delay: 0.1 },*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* exit={{*/}
|
|
||||||
{/* opacity: 0,*/}
|
|
||||||
{/* transition: { duration: 0.15 },*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/* >*/}
|
|
||||||
{/* {sections.map((section) => (*/}
|
|
||||||
{/* <li key={section.id}>*/}
|
|
||||||
{/* <NavLink*/}
|
|
||||||
{/* href={`${link.href}#${section.id}`}*/}
|
|
||||||
{/* tag={section.tag}*/}
|
|
||||||
{/* isAnchorLink*/}
|
|
||||||
{/* >*/}
|
|
||||||
{/* {section.title}*/}
|
|
||||||
{/* </NavLink>*/}
|
|
||||||
{/* </li>*/}
|
|
||||||
{/* ))}*/}
|
|
||||||
{/* </motion.ul>*/}
|
|
||||||
{/* )}*/}
|
|
||||||
{/*</AnimatePresence>*/}
|
|
||||||
</motion.li>
|
</motion.li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module.exports = {
|
|||||||
fontSize: {
|
fontSize: {
|
||||||
'2xs': ['0.75rem', { lineHeight: '1.25rem' }],
|
'2xs': ['0.75rem', { lineHeight: '1.25rem' }],
|
||||||
xs: ['0.8125rem', { lineHeight: '1.5rem' }],
|
xs: ['0.8125rem', { lineHeight: '1.5rem' }],
|
||||||
sm: ['0.875rem', { lineHeight: '1.5rem' }],
|
sm: ['1rem', { lineHeight: '1.5rem' }],
|
||||||
base: ['1rem', { lineHeight: '1.75rem' }],
|
base: ['1rem', { lineHeight: '1.75rem' }],
|
||||||
lg: ['1.125rem', { lineHeight: '1.75rem' }],
|
lg: ['1.125rem', { lineHeight: '1.75rem' }],
|
||||||
xl: ['1.25rem', { lineHeight: '1.75rem' }],
|
xl: ['1.25rem', { lineHeight: '1.75rem' }],
|
||||||
|
|||||||
Reference in New Issue
Block a user