fix: make side-nav scrollable (#362)

- update shell.component.scss file to add scroll bar when content overflows. 
- update sidenav.component.scss to remove absolute positioned app icon and fix frequently visited links spacing.
- update sidenav.component.html to move frequently visited links heading to parent container.

Fixes: #358
This commit is contained in:
Jivjyot Singh
2019-01-03 02:16:42 +05:30
committed by Abhay Chawla
parent ff77528990
commit 6f5134e860
3 changed files with 19 additions and 23 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
.sidebar-panel {
background-color: #fff;
min-height: 100vh;
overflow: hidden;
overflow: auto;
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
@@ -33,11 +33,11 @@
<div class="app-sidenav">
<!-- TODO: Generate frequently accessed routes dynamically -->
<div class="mt-1 mb-1 nav-item-sep">
<mat-divider></mat-divider>
<span class="text-muted icon-menu-title">Frequently Accessed</span>
</div>
<div class="icon-menu">
<div class="mt-1 mb-1 nav-item-sep">
<mat-divider></mat-divider>
<span class="text-muted icon-menu-title">Frequently Accessed</span>
</div>
<div class="icon-menu-item">
<button mat-raised-button matTooltip="Home" [routerLink]="['/home']">
<fa-icon icon="home" size="lg"></fa-icon>
@@ -1,11 +1,9 @@
.sidebar-full,
.sidebar-compact {
.navigation-panel {
position: absolute;
left: 0;
width: 100%;
height: 100%;
padding-top: 64px;
padding-top: 20%;
background: hsla(0, 0%, 100%, 0.95);
}
@@ -18,13 +16,7 @@
align-items: center;
justify-content: center;
text-align: center;
position: fixed;
width: 100%;
max-width: 15rem;
height: 64px;
line-height: 64px;
top: 0;
left: 0;
z-index: 9999;
color: #444;
@@ -96,8 +88,9 @@
.app-sidenav {
.icon-menu {
padding: 0 24px;
opacity: 1;
display: flex;
flex-direction: column;
justify-content: space-evenly;
.mat-divider {
margin: 0 -24px;
@@ -171,13 +164,16 @@
span {
display: none;
}
.icon-menu-item {
button {
margin: 0 0 4px 0;
padding: 0 20px;
}
}
}
}
}
.sidebar-full {
.navigation-panel {
padding-top: 5%;
}
.app-sidenav {
.icon-menu {
flex-direction: row;
}
}
}