component: adjust more on the responsive behavior of SideDrawer and NavigationItems component

This commit is contained in:
oscarzhou 2020-12-13 16:39:52 +13:00
parent bdcb128433
commit 1fd471f58a
5 changed files with 47 additions and 15 deletions

View File

@ -1,25 +1,43 @@
.NavigationItem { .NavigationItem {
margin: 0; margin: 10px 0;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: block;
height: 100%; width: 100%;
align-items: center;
} }
.NavigationItem a {
.NavigationItem a{ color:#8f5c2c;
color: white;
text-decoration: none; text-decoration: none;
height: 100%; width: 100%;
padding: 16px 10px;
border-bottom: 4px solid transparent;
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
} }
.NavigationItem a:hover, .NavigationItem a:hover,
.NavigationItem a:active, .NavigationItem a:active,
.NavigationItem a.active { .NavigationItem a.active {
background-color: #8f5c2c; color: #40a4c8;
border-bottom: 4px solid #40a4c8; }
@media (min-width: 500px) {
.NavigationItem {
margin: 0;
display: flex;
height: 100%;
width: auto;
align-items: center;
}
.NavigationItem a {
color: white;
height: 100%;
padding: 16px 10px;
border-bottom: 4px solid transparent;
}
.NavigationItem a:hover,
.NavigationItem a:active,
.NavigationItem a.active {
background-color: #8f5c2c;
border-bottom: 4px solid #40a4c8;
color: white;
}
} }

View File

@ -3,6 +3,13 @@
padding: 0; padding: 0;
list-style: none; list-style: none;
display: flex; display: flex;
flex-flow: column;
align-items: center; align-items: center;
height: 100%; height: 100%;
}
@media (min-width: 500px) {
.NavigationItems{
flex-flow: row;
}
} }

View File

@ -28,4 +28,5 @@
.Logo{ .Logo{
height: 11%; height: 11%;
margin-bottom: 32px;
} }

View File

@ -19,4 +19,10 @@
.Logo{ .Logo{
height: 80%; height: 80%;
}
@media (max-width: 499px) {
.DesktopOnly {
display: none;
}
} }

View File

@ -11,7 +11,7 @@ const toolbar = () => {
<div className={classes.Logo}> <div className={classes.Logo}>
<Logo /> <Logo />
</div> </div>
<nav> <nav className={classes.DesktopOnly}>
<NavigationItems /> <NavigationItems />
</nav> </nav>
</header> </header>