misc fixes

- smaller hamburger
- z-index fixes
- active fixes
This commit is contained in:
Robbie Davis 2022-03-11 12:35:01 -05:00
parent 8ffeb6d290
commit b3ed553954
10 changed files with 43 additions and 22 deletions

View file

@ -8,7 +8,7 @@
.side-nav-toggle { .side-nav-toggle {
cursor: pointer; cursor: pointer;
font-size: 25px; font-size: 1.2rem;
i { i {
color: var(--navbar-fa-icon-color); color: var(--navbar-fa-icon-color);
} }

View file

@ -12,6 +12,7 @@
<ng-template #inner> <ng-template #inner>
<div class="active-highlight"></div>
<span class="phone-hidden" title="{{title}}"> <span class="phone-hidden" title="{{title}}">
<div> <div>
<i class="fa {{icon}}" aria-hidden="true"></i>&nbsp; <i class="fa {{icon}}" aria-hidden="true"></i>&nbsp;

View file

@ -10,10 +10,6 @@
cursor: pointer; // This needs to be based a flag cursor: pointer; // This needs to be based a flag
.active {
color: var(--primary-color);
}
.side-nav-text { .side-nav-text {
padding-left: 10px; padding-left: 10px;
opacity: 1; opacity: 1;
@ -29,6 +25,16 @@
opacity: 1; opacity: 1;
} }
.active {
color: var(--primary-color);
}
span {
&:last-child {
flex-grow: 1;
justify-content: end;
}
div { div {
align-items: center; align-items: center;
display: flex; display: flex;
@ -42,12 +48,6 @@
font-size: 18px; font-size: 18px;
} }
} }
span {
&:last-child {
flex-grow: 1;
justify-content: end;
}
} }
} }

View file

@ -33,6 +33,8 @@ export class SideNavItemComponent implements OnInit, OnDestroy {
takeUntil(this.onDestroy), takeUntil(this.onDestroy),
map(evt => evt as NavigationEnd)) map(evt => evt as NavigationEnd))
.subscribe((evt: NavigationEnd) => { .subscribe((evt: NavigationEnd) => {
console.log(evt.url.split('?')[0]);
console.log(this.link);
if (this.link !== undefined && evt.url.split('?')[0] === this.link) { if (this.link !== undefined && evt.url.split('?')[0] === this.link) {
this.highlighted = true; this.highlighted = true;
} }

View file

@ -10,7 +10,7 @@
<div class="mt-3"> <div class="mt-3">
<app-side-nav-item icon="fa-home" title="Home" link="/library"></app-side-nav-item> <app-side-nav-item icon="fa-home" title="Home" link="/library"></app-side-nav-item>
<app-side-nav-item icon="fa-list" title="Collections" link="/collections"></app-side-nav-item> <app-side-nav-item icon="fa-list" title="Collections" link="/collections"></app-side-nav-item>
<app-side-nav-item icon="fa-list-ol" title="Reading Lists" link="/lists"></app-side-nav-item> <app-side-nav-item icon="fa-list-ol" title="Reading Lists" link="/lists/"></app-side-nav-item>
<app-side-nav-item icon="fa-regular fa-rectangle-list" title="All Series" link="/all-series"></app-side-nav-item> <app-side-nav-item icon="fa-regular fa-rectangle-list" title="All Series" link="/all-series"></app-side-nav-item>
<div class="mb-3" * ngIf="libraries.length > 10"> <div class="mb-3" * ngIf="libraries.length > 10">
<label for="filter" class="form-label">Filter</label> <label for="filter" class="form-label">Filter</label>

View file

@ -2,11 +2,11 @@
padding: 10px 0; padding: 10px 0;
width: 190px; width: 190px;
background-color: var(--side-nav-bg-color); background-color: var(--side-nav-bg-color);
height: calc(100vh - 76px); height: calc(100vh - 85px);
position: fixed; position: fixed;
margin: 0; margin: 0;
left: 10px; left: 10px;
top: 66px; top: 73px;
border-radius: var(--side-nav-border-radius); border-radius: var(--side-nav-border-radius);
transition: width var(--side-nav-openclose-transition), background-color var(--side-nav-bg-color-transition), border-color var(--side-nav-border-transition); transition: width var(--side-nav-openclose-transition), background-color var(--side-nav-bg-color-transition), border-color var(--side-nav-border-transition);
overflow: auto; overflow: auto;

View file

@ -16,5 +16,5 @@
} }
.dropdown { .dropdown {
z-index: 1055 !important; // ngb v12 bug: https://github.com/ng-bootstrap/ng-bootstrap/issues/2686 //z-index: 1055 !important; // ngb v12 bug: https://github.com/ng-bootstrap/ng-bootstrap/issues/2686
} }

View file

@ -1,4 +1,8 @@
.modal-content { .modal {
color: var(--body-text-color); z-index: 1056; // ngb v12 bug: https://github.com/ng-bootstrap/ng-bootstrap/issues/2686
background-color: var(--bs-body-bg); }
.modal-content {
background-color: var(--bs-body-bg);
color: var(--body-text-color);
} }

View file

@ -1,6 +1,7 @@
.navbar { .navbar {
background-color: var(--navbar-bg-color); background-color: var(--navbar-bg-color);
color: var(--navbar-text-color); color: var(--navbar-text-color);
z-index: 1056;
} }

View file

@ -4,6 +4,7 @@
} }
.side-nav-item { .side-nav-item {
position: relative;
&.closed { &.closed {
.side-nav-text { .side-nav-text {
@ -28,6 +29,18 @@
&.active { &.active {
color: var(--side-nav-item-active-color); color: var(--side-nav-item-active-color);
background-color: var(--side-nav-active-bg-color); background-color: var(--side-nav-active-bg-color);
.active-highlight {
background-color: var(--side-nav-item-active-color);
width: 5px;
height: 100%;
position: absolute;
left: 0;
}
&:hover {
background-color: var(--side-nav-hover-bg-color);
}
} }
} }