Added weather widget
This commit is contained in:
@ -1,7 +1,22 @@
|
||||
<div class="p-3">
|
||||
<mat-card class="w-100 hover" routerLink="/battery">
|
||||
<mat-card-content>
|
||||
<battery-widget></battery-widget>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<div class="desktop-height p-3">
|
||||
<div>
|
||||
<h1 class="d-inline">{{now | async | date: 'fullDate'}}</h1>
|
||||
<h1 class="d-inline float-right">{{now | async | date: 'mediumTime'}}</h1>
|
||||
</div>
|
||||
<div class="mt-3 d-flex">
|
||||
<div class="flex-grow-1 pr-2">
|
||||
<mat-card class="w-100 hover" routerLink="/weather">
|
||||
<mat-card-content>
|
||||
<weather-widget class="mx-auto"></weather-widget>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="flex-grow-1 pl-2">
|
||||
<mat-card class="w-100 hover" routerLink="/battery">
|
||||
<mat-card-content>
|
||||
<battery-widget></battery-widget>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,15 +1,13 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {AppComponent} from '../app.component';
|
||||
import {Component} from '@angular/core';
|
||||
import {timer} from 'rxjs';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html'
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html'
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
|
||||
constructor(private app: AppComponent) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
export class DashboardComponent {
|
||||
now = timer(0, 1000).pipe(map(() => new Date()));
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
|
Reference in New Issue
Block a user