Skip to content

Commit

Permalink
test: fix sidebar bg loading
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoBorzi committed Jun 16, 2019
1 parent c283a82 commit 3eb11f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<nav id="sidebar" class="sidebar" [ngClass]="{'sidebar-bg' : hasBackgroundImage()}">
<nav
id="sidebar"
class="sidebar"
[ngClass]="{'sidebar-bg' : hasBackgroundImage()}"
style="background-image: url(assets/img/bg1.jpg);"
>
<div class="sidebar-content">
<perfect-scrollbar>
<div class="sidebar-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ $img-shadow-color:rgba(0, 0, 0, 0.5);
// styles with background image
&.sidebar-bg {

background-image: url(assets/img/bg1.jpg);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
Expand Down
5 changes: 5 additions & 0 deletions src/app/components/main-window/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export class SidebarComponent {
return this.sidebarService.hasBackgroundImage;
}

getStyle(): string {
return `background-image: url(assets/img/bg1.jpg);`;
// return this.hasBackgroundImage() ? `background-image: 'assets/img/bg1.jpg';` : '';
}

toggleState(key: string) {
this.menuStates[key] = this.menuStates[key] === 'up' ? 'down' : 'up';
}
Expand Down

0 comments on commit 3eb11f1

Please sign in to comment.