Implemented flexbox styling for root layout
This commit is contained in:
1 parent
9da39c8f91
commit
83f260c42d
6 files changed
+21
-27
No files matched your search
@@ -1,10 +1,3 @@
|
|||||||
#root {
|
|
||||||
max-width: 1280px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
height: 6em;
|
height: 6em;
|
||||||
padding: 1.5em;
|
padding: 1.5em;
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
.dashboard-sidebar {
|
.dashboard-sidebar {
|
||||||
height: 100vh;
|
height: calc(100vh - 64px);
|
||||||
width: 250px;
|
width: 250px;
|
||||||
border: 1px solid var(--color-border-0);
|
border: 1px solid var(--color-border-0);
|
||||||
border-radius: var(--border-radius-0);
|
border-top: none;
|
||||||
position: fixed;
|
border-bottom: none;
|
||||||
top: 0;
|
top: 64px;
|
||||||
left: 0;
|
position: sticky;
|
||||||
|
z-index: 100;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 20px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-container {
|
.dashboard-menu-container{
|
||||||
margin-top: 60px;
|
padding-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.support-container {
|
.support-container {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ function NavBar() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<AppBar
|
<AppBar
|
||||||
position="fixed"
|
position="sticky"
|
||||||
sx={{
|
sx={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
.home-layout {
|
.main-content {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: max-content;
|
||||||
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
.main-content>div:nth-child(2){
|
||||||
margin-left: 250px;
|
position: relative;
|
||||||
flex: 1;
|
|
||||||
/* padding: 20px; */
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
@@ -12,17 +12,17 @@ const HomeLayout = () => {
|
|||||||
const { user, msg } = authState;
|
const { user, msg } = authState;
|
||||||
return (
|
return (
|
||||||
<div className="home-layout">
|
<div className="home-layout">
|
||||||
<DashboardSidebar />
|
<NavBar />
|
||||||
<div className="main-content">
|
<div className="main-content">
|
||||||
<NavBar />
|
<DashboardSidebar />
|
||||||
{/* Remove me later */}
|
{/* Remove me later */}
|
||||||
{user && <p>{user.firstname}</p>}
|
{user && <p>{user.firstname}</p>}
|
||||||
{user && <p>{user.lastname}</p>}
|
{user && <p>{user.lastname}</p>}
|
||||||
{user && <p>{user.email}</p>}
|
{user && <p>{user.email}</p>}
|
||||||
{msg && <p>Msg: {msg}</p>}
|
{msg && <p>Msg: {msg}</p>}
|
||||||
{/* I am a demo */}
|
{/* I am a demo */}
|
||||||
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
<Outlet />
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -69,10 +69,8 @@ a:hover {
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
|
||||||
place-items: center;
|
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|||||||
Reference in new issue
Block a user