Adjust layout

This commit is contained in:
braginini
2023-05-22 15:32:12 +02:00
parent 1cf79d45a8
commit b0a2f744a3
3 changed files with 4 additions and 32 deletions

View File

@@ -146,7 +146,7 @@ export function Layout({ children, title, tableOfContents }) {
return (
<>
<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
layoutScroll
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>
<Footer />
</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">
{tableOfContents.length > 0 && (
<>

View File

@@ -79,7 +79,7 @@ function NavigationGroup({ group, className }) {
<li className={clsx('relative mt-6', className)}>
<motion.h2
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}
</motion.h2>
@@ -104,34 +104,6 @@ function NavigationGroup({ group, className }) {
<NavLink href={link.href} active={link.href === router.pathname}>
{link.title}
</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>
))}
</ul>