去除主体页面最小边框限制,去除页面多余边距导致内容过窄页面换行变形的问题
This commit is contained in:
@@ -18,11 +18,13 @@ function LayoutContent({ children }: { children: React.ReactNode }) {
|
|||||||
pathname === "/" || pathname === "/devices" || pathname === "/content" || pathname === "/profile"
|
pathname === "/" || pathname === "/devices" || pathname === "/content" || pathname === "/profile"
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="max-w-[390px] mx-auto bg-white min-h-screen flex flex-col relative">
|
<div className="mx-auto w-full">
|
||||||
{children}
|
<main className="w-full mx-auto bg-white min-h-screen flex flex-col relative lg:max-w-7xl xl:max-w-[1200px]">
|
||||||
{showBottomNav && <BottomNav />}
|
{children}
|
||||||
{showBottomNav && <VideoTutorialButton />}
|
{showBottomNav && <BottomNav />}
|
||||||
</main>
|
{showBottomNav && <VideoTutorialButton />}
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default function BottomNav() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200">
|
<nav className="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200">
|
||||||
<div className="max-w-md mx-auto flex justify-around">
|
<div className="w-full mx-auto flex justify-around">
|
||||||
{navItems.map((item) => (
|
{navItems.map((item) => (
|
||||||
<Link
|
<Link
|
||||||
key={item.href}
|
key={item.href}
|
||||||
|
|||||||
@@ -13,11 +13,13 @@ export default function LayoutWrapper({ children }: { children: React.ReactNode
|
|||||||
const showBottomNav = mainPages.includes(pathname)
|
const showBottomNav = mainPages.includes(pathname)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="max-w-[390px] mx-auto bg-white min-h-screen flex flex-col relative">
|
<div className="mx-auto w-full">
|
||||||
{children}
|
<main className="w-full mx-auto bg-white min-h-screen flex flex-col relative lg:max-w-7xl xl:max-w-[1200px]">
|
||||||
{showBottomNav && <BottomNav />}
|
{children}
|
||||||
{showBottomNav && <VideoTutorialButton />}
|
{showBottomNav && <BottomNav />}
|
||||||
</main>
|
{showBottomNav && <VideoTutorialButton />}
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,3 @@ export default function RootLayout({
|
|||||||
</html>
|
</html>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import './globals.css'
|
|
||||||
Reference in New Issue
Block a user