сделал боковую панель фиксированной

This commit is contained in:
Андрей Дувакин 2025-02-10 17:30:42 +05:00
parent 1101706f61
commit a2fc3db049

View File

@ -44,7 +44,7 @@ const MainLayout = () => {
return ( return (
<Layout style={{minHeight: "100vh"}}> <Layout style={{minHeight: "100vh"}}>
<Sider collapsible collapsed={collapsed} onCollapse={setCollapsed}> <Sider collapsible collapsed={collapsed} onCollapse={setCollapsed} style={{height: "100vh", position: "fixed", left: 0}}>
<div style={{display: "flex", justifyContent: "center", padding: 16}}> <div style={{display: "flex", justifyContent: "center", padding: 16}}>
<img <img
src="/logo_rounded.png" src="/logo_rounded.png"
@ -61,13 +61,10 @@ const MainLayout = () => {
/> />
</Sider> </Sider>
<Layout> <Layout style={{marginLeft: collapsed ? 80 : 200, transition: "margin-left 0.2s"}}>
<Content style={{margin: "0 16px"}}> <Content style={{margin: "0 16px", padding: 24, minHeight: "100vh", overflow: "auto", background: "#fff", borderRadius: 8}}>
<div style={{marginTop: 15, padding: 24, minHeight: 360, background: "#fff", borderRadius: 8}}>
<Outlet/> <Outlet/>
</div>
</Content> </Content>
<Footer style={{textAlign: "center"}}>Линза+ © {new Date().getFullYear()}</Footer> <Footer style={{textAlign: "center"}}>Линза+ © {new Date().getFullYear()}</Footer>
</Layout> </Layout>
</Layout> </Layout>