Fix layout

This commit is contained in:
braginini
2023-05-24 12:30:00 +02:00
parent 04ea9c4991
commit 4b1eee2ce8
2 changed files with 4 additions and 4 deletions

View File

@@ -158,8 +158,7 @@ export function Layout({ children, title, tableOfContents }) {
</Link>
</div>
<Header />
{router.route.startsWith("/ipa") && <NavigationAPI className="hidden lg:mt-10 lg:block" tableOfContents={tableOfContents} />}
{!router.route.startsWith("/ipa") && <NavigationDocs className="hidden lg:mt-10 lg:block" />}
{router.route.startsWith("/ipa") ? <NavigationAPI className="hidden lg:mt-10 lg:block" tableOfContents={tableOfContents} /> : <NavigationDocs className="hidden lg:mt-10 lg:block" />}
</div>
</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-5">
@@ -168,6 +167,7 @@ export function Layout({ children, title, tableOfContents }) {
</main>
<Footer />
</div>
{/*{router.route.startsWith("/ipa/resources") && <div className="w-64"></div>}*/}
{!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-80">
{tableOfContents.length > 0 && (

View File

@@ -45,11 +45,11 @@ module.exports = ({ theme }) => ({
// Layout
'> *': {
maxWidth: theme('maxWidth.2xl'),
marginLeft: 'auto',
marginLeft: 0,
marginRight: 'auto',
'@screen lg': {
maxWidth: theme('maxWidth.3xl'),
marginLeft: `calc(50% - min(50%, ${theme('maxWidth.lg')}))`,
marginLeft: 0,
marginRight: `calc(50% - min(50%, ${theme('maxWidth.lg')}))`,
},
},