From 374e7df34db1d03a66d8aa7e9b867255caeed51d Mon Sep 17 00:00:00 2001 From: HardiReady Date: Tue, 17 Jul 2018 09:09:56 +0200 Subject: [PATCH] clear background for left element on specifiv pages --- static/src/app/app.component.html | 5 ++++- static/src/app/app.component.ts | 22 +++++++++++++++++++--- static/src/app/login/signup.component.html | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/static/src/app/app.component.html b/static/src/app/app.component.html index 9fcba6a..ba388f7 100644 --- a/static/src/app/app.component.html +++ b/static/src/app/app.component.html @@ -105,7 +105,10 @@ -
+
diff --git a/static/src/app/app.component.ts b/static/src/app/app.component.ts index cae031c..bdb5814 100644 --- a/static/src/app/app.component.ts +++ b/static/src/app/app.component.ts @@ -29,6 +29,10 @@ export class AppComponent implements OnInit { scrollBtnVisibleVal = 100; + leftBackground; + + leftBoxShadow; + svgIcons = { 'add': 'outline-add_box-24px', 'add-user': 'twotone-person_add-24px', @@ -55,14 +59,26 @@ export class AppComponent implements OnInit { this.loading = true; } if (event instanceof NavigationEnd) { + const currentUrl = this.router.url; + this.loading = false; // scroll to top on route from army overview to user detail and back - if (router.url.includes('/overview')) { + if (currentUrl.includes('/overview')) { this.scrollToTop(); } - // show sidebar menu on initial stats page access + // show sidebar menu on initial page access this.sidebarOpen = true; - this.showSidebarToggleBtn = router.url.includes('/stats'); + this.showSidebarToggleBtn = currentUrl.includes('/stats'); + + if (currentUrl.includes('/login') || + currentUrl.includes('/signup') || + currentUrl.endsWith('/404')) { + this.leftBackground = 'none'; + this.leftBoxShadow = 'none'; + } else { + this.leftBackground = '#f9f9f9'; + this.leftBoxShadow = '2px 1px 5px grey'; + } } }); } diff --git a/static/src/app/login/signup.component.html b/static/src/app/login/signup.component.html index 7986a8b..5ae3eb6 100644 --- a/static/src/app/login/signup.component.html +++ b/static/src/app/login/signup.component.html @@ -1,11 +1,11 @@