Implemented flexbox styling for root layout

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