diff --git a/docs/app/pages/home/main-info-section/main-info-section.component.html b/docs/app/pages/home/main-info-section/main-info-section.component.html index 427e62c0..ee1a36d4 100644 --- a/docs/app/pages/home/main-info-section/main-info-section.component.html +++ b/docs/app/pages/home/main-info-section/main-info-section.component.html @@ -5,7 +5,7 @@ + [lazyLoad]="imageUrl"/>
diff --git a/docs/app/pages/home/main-info-section/main-info-section.component.ts b/docs/app/pages/home/main-info-section/main-info-section.component.ts index a6084785..19fb13a6 100644 --- a/docs/app/pages/home/main-info-section/main-info-section.component.ts +++ b/docs/app/pages/home/main-info-section/main-info-section.component.ts @@ -4,7 +4,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. */ -import { Component, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, Input, OnInit } from '@angular/core'; +import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme'; import { takeWhile } from 'rxjs/operators'; @@ -14,24 +15,31 @@ import { takeWhile } from 'rxjs/operators'; styleUrls: ['./main-info-section.component.scss'], }) export class MainInfoSectionComponent implements OnDestroy { - - private alive = true; - - breakpoint: NbMediaBreakpoint; - breakpoints: any; - - constructor(private themeService: NbThemeService, - private breakpointService: NbMediaBreakpointsService) { - - this.breakpoints = this.breakpointService.getBreakpointsMap(); - this.themeService.onMediaQueryChange() + constructor(themeService: NbThemeService, breakpointService: NbMediaBreakpointsService) { + this.breakpoints = breakpointService.getBreakpointsMap(); + themeService.onMediaQueryChange() .pipe(takeWhile(() => this.alive)) .subscribe(([oldValue, newValue]) => { this.breakpoint = newValue; }); } - ngOnDestroy() { + private alive = true; + public readonly breakpoints: any; + public breakpoint: NbMediaBreakpoint; + public forMaterialTheme: boolean = false; + + @Input() public set material(value: any) { + this.forMaterialTheme = coerceBooleanProperty(value); + } + + public get imageUrl(): string { + return this.forMaterialTheme + ? 'assets/img/ngx-admin-material.png' + : '/assets/img/ngx-admin.png'; + } + + public ngOnDestroy() { this.alive = false; } } diff --git a/docs/app/pages/home/material-landing/material-landing.component.html b/docs/app/pages/home/material-landing/material-landing.component.html index e648b1a1..d9fe72ec 100644 --- a/docs/app/pages/home/material-landing/material-landing.component.html +++ b/docs/app/pages/home/material-landing/material-landing.component.html @@ -3,6 +3,10 @@ + + + + diff --git a/docs/assets/img/ngx-admin-material.png b/docs/assets/img/ngx-admin-material.png new file mode 100644 index 00000000..96d75464 Binary files /dev/null and b/docs/assets/img/ngx-admin-material.png differ