From f066843b9cee2ff2424b8dbe157fd495d5462fe6 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Wed, 14 Nov 2018 13:28:10 -0500 Subject: [PATCH] Fixed drawer --- src/app/app.component.ts | 4 +- src/app/weather/weather.component.html | 52 +++++++++++++------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 3d4c3af..ae6c9db 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -20,12 +20,12 @@ export class AppComponent { constructor(public batteryService: BatteryService, router: Router, route: ActivatedRoute, breakpointObserver: BreakpointObserver) { router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => { this.hide = !!route.root.firstChild.snapshot.data.hide; - if(this.hide) this.open = false; + this.open = !this.hide && !this.mobile; }); breakpointObserver.observe([Breakpoints.Handset]).subscribe(result => { this.mobile = result.matches; - this.open = !this.hide && !this.mobile; + this.open = !this.mobile; }) } } diff --git a/src/app/weather/weather.component.html b/src/app/weather/weather.component.html index 7268f04..b2915ab 100644 --- a/src/app/weather/weather.component.html +++ b/src/app/weather/weather.component.html @@ -1,27 +1,29 @@ -
- -
-

{{weatherService.temp}} °C

-

{{weatherService.weather}}

+
+
+ +
+

{{weatherService.temp}} °C

+

{{weatherService.weather}}

+
+
+
+ {{weatherService.humidity}} % +
+
+ {{weatherService.cloudCover}} % +
+
+ {{weatherService.wind[1]}} KM/H +
+
+ +
+
+ {{w.day}} + + {{w.temp}} °C +
+
+
-
-
- {{weatherService.humidity}} % -
-
- {{weatherService.cloudCover}} % -
-
- {{weatherService.wind[1]}} KM/H -
-
- -
-
- {{w.day}} - - {{w.temp}} °C -
-
-