feat(landing): add admin premium modal (#5782)

This commit is contained in:
SFilinsky 2020-10-09 14:44:18 +03:00 committed by GitHub
parent 067f179ed6
commit 39600d9ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 246 additions and 179 deletions

View file

@ -41,6 +41,11 @@
</a>
</div>
<ngx-download-admin></ngx-download-admin>
<button (click)="openDownloadDialog()" class="btn btn-download">
Download
</button>
<button (click)="openDownloadPremiumDialog()" class="btn btn-download-premium">
Get ngx-admin PREMIUM for 89$
</button>
</div>
</div>

View file

@ -11,7 +11,7 @@
$color-active: nb-theme(color-active-fg);
display: flex;
padding: 3.375rem 0 0;
padding: 3.375rem 0;
max-width: 120rem;
margin: 0 auto;
@ -133,8 +133,9 @@
cursor: pointer;
text-transform: uppercase;
&.btn-demo {
margin-left: 1em;
&.btn-demo,
&.btn-download,
&.btn-download-premium {
color: #ffffff;
background-color: nb-theme(color-active-fg);
box-shadow: nb-theme(shadow-btn);
@ -155,6 +156,16 @@
&:active {
box-shadow: nb-theme(shadow-active-btn);
}
&.btn-demo {
margin-left: 1em;
}
}
.btn-download,
.btn-download-premium {
margin-top: 1rem;
width: 100%;
}
@include media-breakpoint-down(xxl) {

View file

@ -5,9 +5,12 @@
*/
import { Component, OnDestroy, Input } from '@angular/core';
import { NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme';
import { NbDialogService, NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme';
import { takeWhile } from 'rxjs/operators';
import { DownloadFormComponent } from '../../../shared/components/download-form/download-form.component';
import { PremiumFormComponent } from '../../../shared/components/premium-form/premium-form.component';
@Component({
selector: 'ngx-landing-main-info',
templateUrl: './main-info-section.component.html',
@ -15,7 +18,8 @@ import { takeWhile } from 'rxjs/operators';
})
export class MainInfoSectionComponent implements OnDestroy {
constructor(themeService: NbThemeService,
breakpointService: NbMediaBreakpointsService) {
breakpointService: NbMediaBreakpointsService,
private dialogService: NbDialogService) {
this.breakpoints = breakpointService.getBreakpointsMap();
themeService.onMediaQueryChange()
.pipe(takeWhile(() => this.alive))
@ -42,4 +46,12 @@ export class MainInfoSectionComponent implements OnDestroy {
public ngOnDestroy() {
this.alive = false;
}
openDownloadDialog() {
this.dialogService.open(DownloadFormComponent);
}
openDownloadPremiumDialog() {
this.dialogService.open(PremiumFormComponent);
}
}